Opened 9 years ago
Last modified 9 years ago
#9992 new bug
limiting the axis of a draggable+sortable does not limit scrolling
Reported by: | panzi | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.sortable | Version: | git (not yet released) |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When you connect a draggable to a sortable and limit the movement for both to the y axis jQuery UI still scrolls the page vertically if you move the draggable onto the sortable and then the mouse to the right outside of the frame (if there are elements on the right outside of the visible area).
I triggered this in an iframe based widget where the iframe has overflow:hidden/scrolling=no and slides in different "pages" via jQuery. On one page you can do the described D'n'D interaction, but if you hit the right border there are suddenly things revealed that shouldn't be.
Here is a demo of the bug: http://pub.crowdranking.com/bugs/jquery-ui-limit-scroll.html
Here is a fix: https://github.com/panzi/jquery-ui/commit/e59f9ace977a87163fa789232e3213774adf52ec (I signed the CLA online - my email address is [email protected]…)
I hadn't had time to write a unit test for it right now. I'm not sure if this is possible to unit-test (you have to drag something around the edge of an iframe, only sometimes triggering the bug).
In Firefox the bug seems to be easier to reproduce than in Chrome and on our production website it was even easier (=100% "success" rate).
Sorry I meant "horizontally" in the first sentence.