Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2814

Calling Clients.scrollIntoView(null) shows a error message

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 7.0.6
    • Fix Version/s: 7.0.6
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 7.0.7

      Description

      Steps to reproduce

      1. call Clients.scrollIntoView(null) in an onClick listener under 7.0.6.FL.20150708-Eval
        or pass a detached component to Clients.scrollIntoView()

      Actual result

      An error message dialog show:

      Failed to process
      scrollIntoView
      Cannot read property 'uuid' of undefined (TypeError)

      This issue doesn't happen in 7.0.5 and 7.0.4

      Extra Information

      • Passing a null or detached component to scrollIntoView() can be treated as an invalid case. Showing error message can express it's invalid more explicitly. But maybe javascript error is hard to understand. We can consider throwing an exception in Java with explicit message like Cannot scroll to a null or detached component or more general one Component is null or detached.
      • Another use case is: when calling scrollIntoView(myComp), myComp is not null and not detached, myComp is detached in later program. In such case, checking the parameter doesn't take effect.

        Attachments

          Activity

            People

            • Assignee:
              ChunfuChang ChunfuChang
              Reporter:
              hawk hawk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h