#5009 closed bug (fixed)
Draggable: scroll not working with parent's position fixed
Reported by: | tyron | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.10.3 |
Component: | ui.draggable | Version: | 1.7.2 |
Keywords: | scroll fixed position | Cc: | |
Blocked by: | Blocking: |
Description
If you create a draggable element inside an fixed positioned element and you drag it all the way down the screen, the element begins to distance from the mouse while the window scrolls.
You can recreate this steps following the steps.
- Access the URL http://jqueryui.com/demos/draggable/constrain-movement.html, which is the first example of Draggable - in a new window.
- Execute the code below in your address's bar:
javascript:(function(){$("#draggable").css('top', '4000px');$("#draggable5").parent().css('position','fixed');$("#draggable5").draggable('option','containment', 'html');})();
- Now, drag the "I'm contained within my parent." box down, and you'll see the results.
If you don't want to use javascript to do the above, you should:
- Move the draggable1 (which says "I can be dragged only vertically.") down the screen until there's much vertical scrollbar.
- Add to the "#draggable5"'s outer div the rule: "position: fixed;".
- Make the "#draggable5"'s containment the html page.
This happens in the stable version 1.7.2 and the SVN's 1.8a1.
Change History (11)
comment:1 Changed 13 years ago by
Milestone: | TBD → 1.next |
---|---|
Version: | 1.8a1 → 1.7.2 |
comment:2 Changed 12 years ago by
Priority: | critical → major |
---|
comment:3 Changed 10 years ago by
Milestone: | 1.next → 2.0.0 |
---|
comment:4 Changed 10 years ago by
Status: | new → open |
---|
comment:5 Changed 10 years ago by
Summary: | Draggable scroll not working with parent's position fixed → Draggable: scroll not working with parent's position fixed |
---|
comment:7 Changed 10 years ago by
Reduced test case against master http://jsfiddle.net/tj_vantoll/2hAuY/.
comment:8 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Draggable: Don't cache parent offset if the parent position is fixed. Fixes #5009 - Draggable: scroll not working with parent's position fixed
Changeset: 49c7b7200ef944ffc93487e79e763dfe97b4ff4a
comment:9 Changed 10 years ago by
Milestone: | 2.0.0 → 1.11.0 |
---|
comment:10 Changed 10 years ago by
Draggable: Don't cache parent offset if the parent position is fixed. Fixes #5009 - Draggable: scroll not working with parent's position fixed(cherry picked from commit 49c7b7200ef944ffc93487e79e763dfe97b4ff4a)
Changeset: c1011b5b9dbdf59acff2fc26b832e0fba09346bd
comment:11 Changed 10 years ago by
Milestone: | 1.11.0 → 1.10.3 |
---|
confirmed: http://jsfiddle.net/x7uLD/1/