Skip to main content

Search and Top Navigation

#9992 new bug ()

Opened April 23, 2014 06:16PM UTC

Last modified April 23, 2014 08:36PM UTC

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 grosser.meister.morti@gmx.net)

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).

Attachments (0)
Change History (1)

Changed April 23, 2014 08:36PM UTC by panzi comment:1

Sorry I meant "horizontally" in the first sentence.