Search and Top Navigation
#5039 closed bug (fixed)
Opened January 05, 2010 04:23PM UTC
Closed March 30, 2016 10:53PM UTC
Last modified March 31, 2016 12:44AM UTC
Sortable: does not account for scrolling in positioning
Reported by: | kiechii | Owned by: | arschmitz |
---|---|---|---|
Priority: | minor | Milestone: | 1.12.0 |
Component: | ui.sortable | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
in IE7 the jQuery UI is unable to detect page scroll. So if your page is scrolled down and you try to sort the list the item u are sorting will jump up.
For now I wrote a very ugly hack >.< to fix the issue. If anyone needs a temporary fix let me know I will post the ugly hack. But I rather prefer that the issue is fixed the proper way.
Attachments (0)
Change History (10)
Changed February 05, 2010 11:07PM UTC by comment:1
Changed February 14, 2010 09:41PM UTC by comment:2
I solved this problem by commenting out some lines in ui.sortable.js
Find these lines:
(around line: 303 in 1.7.2 or around line: 331 in 1.8rc1)
$(this.helper).animate({ left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
and delete or comment out parts at the end of each line:
+ (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft)
and
+ (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
I tested it, and it works fine without those parts
(don't forget to keep the comma ',' after the first line (before the 'top' parameter))
Changed January 06, 2012 04:16PM UTC by comment:3
I had a similar issue with jquery ui 1.8.16 and IE 8. When the page is not at the top but scrolled down, the animation of the dropped sortable helper lets it flew to the bottom and out of the page.
The "ugly hack" did the trick for me and corrects the animation.
It looks like cur.top and cur.left already hold the absolute offsets. There seems to be no need to add the relative offsets again which will result in too high values.
Changed October 11, 2012 09:07PM UTC by comment:4
milestone: | TBD → 2.0.0 |
---|
Changed November 06, 2012 03:09AM UTC by comment:5
status: | new → open |
---|---|
summary: | IE 7 Sortable Bug → Sortable: does not account for scrolling in positioning |
No test case, but this is the same issue as #5718
Changed February 22, 2013 02:45AM UTC by comment:8
Reduced test case against master from #9082: http://jsfiddle.net/wjxe4/37/.
Changed March 30, 2016 10:53PM UTC by comment:9
owner: | → arschmitz |
---|---|
resolution: | → fixed |
status: | open → closed |
In [changeset:"9aca7067321643dcb4b5db03855591c35cd85d69" 9aca706]:
#!CommitTicketReference repository="" revision="9aca7067321643dcb4b5db03855591c35cd85d69" Sortable: Update _contactContainers to use page clientX/Y values The sortable was using the window position compared with page position to determine where to drop objects. this was only a problem for sortables far enough down to require scrolling. Fixes #10727 Fixes #5039 Closes gh-1475 Closes gh-1585
Changed March 31, 2016 12:44AM UTC by comment:10
milestone: | 2.0.0 → 1.12.0 |
---|
Problem also occurs in IE8, whats the ugly hack kiechii? Cheers