-
Bug
-
Resolution: Fixed
-
Normal
-
7.0.6
-
None
-
Security Level: Jimmy
-
None
-
ZK 7.0.7
-
None
Steps to reproduce
- 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.