Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gridstack.js:153 Uncaught TypeError: Cannot read property 'scrollTop' of null #891

Closed
saroque opened this issue May 20, 2018 · 4 comments
Closed
Labels

Comments

@saroque
Copy link

saroque commented May 20, 2018

Subject of the issue

Console error when dragging the rectangle to the top side of the page

gridstack.js:153 Uncaught TypeError: Cannot read property 'scrollTop' of null
at Object.updateScrollPosition (VM282 gridstack.min.js:1)
at HTMLDivElement.t (VM282 gridstack.min.js:1)
at $.(/anonymous function).(anonymous function)._trigger (https://code.jquery.com/ui/1.12.1/jquery-ui.js:697:13)
at $.(/anonymous function).(anonymous function)._trigger (https://code.jquery.com/ui/1.12.1/jquery-ui.js:10264:38)
at $.(/anonymous function).(anonymous function)._trigger (https://code.jquery.com/ui/1.12.1/jquery-ui.js:144:25)
at $.(/anonymous function).(anonymous function)._mouseDrag (https://code.jquery.com/ui/1.12.1/jquery-ui.js:9774:14)
at $.(/anonymous function).(anonymous function)._mouseDrag (https://code.jquery.com/ui/1.12.1/jquery-ui.js:144:25)
at $.(/anonymous function).(anonymous function)._mouseMove (https://code.jquery.com/ui/1.12.1/jquery-ui.js:9427:9)
at $.(/anonymous function).(anonymous function)._mouseMove (https://code.jquery.com/ui/1.12.1/jquery-ui.js:144:25)
at HTMLDocument._mouseMoveDelegate (VM57 jquery-ui.js:9378)

Your environment

gridstack 4.0
lodash 4.17.1
Chrome 66.0.3359.181 64 bits

Steps to reproduce

Example:
https://jsbin.com/fuqomekoja/edit?html,js,output
Just drag one of the rectangles to the top side of the page with the Chrome Console (F12) opened

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

@radiolips
Copy link
Member

Thanks - this should be fixed in the dev branch in the next few days.

radiolips added a commit that referenced this issue May 22, 2018
Don't access `scrollEl` until it's been checked for `null`. Fixes #891.
@shavidze
Copy link

This error is still active

@skillnull
Copy link

+1

@skillnull
Copy link

解决方法:image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants