Opened 7 years ago

Closed 7 years ago

#8812 closed bug (duplicate)

jQuery ui.sortable._getParentOffset.top returns different values for chrome and ff

Reported by: amid2887 Owned by: amid2887
Priority: minor Milestone: 1.10.0
Component: ui.sortable Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

jQueryui.sortable._getParentOffset.top returns different values for chrome and ff.

I have different values in that part of script in the _getParentOffset function:

po.top += this.scrollParent.scrollTop();

chrome and ff ( for exmaple ) returns different values..

And that produce some troubles with position of helper when I using ui.sortable.

For me now helps this changes to original code:

  po.top += this.scrollParent.offset().top;

Change History (5)

comment:1 Changed 7 years ago by tj.vantoll

Owner: set to amid2887
Status: newpending

Thanks for taking the time to contribute to the jQuery UI project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the git version of both jQuery UI and jQuery to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/ZgAqH/ Open the link and click to "Fork" (in the top menu) to get started.

comment:2 Changed 7 years ago by Scott González

Also, please provide a description of how this affects users, not just a statement about the return value of an internal method. This will help anyone searching for duplicate tickets or anyone trying to verify and triage the bug.

comment:3 Changed 7 years ago by amid2887

Status: pendingnew

Hmmm. When I tried to create some test page I found the one alternative way to solve that problem.

Test cases are here: http://jsbin.com/ecepav/1 or http://jsfiddle.net/DRWHK/

How to see trouble: In the page you have some table with random info. Each TR of table can be sortable by jQueryUI.sortable(); You can to sort items and all looks fine, but if you scroll page more down and try to sort item you will see the more of scroll provide the most wrong sortable helper axisY position.

I'm trying to fix that like way I wrote upper, but now I found another way:

Problems dissapeared if ( in the examples ) we just remove

body { overflow-y: scroll }

OR

#wrap { position: relative }

. I understand it can be a solution for that but what I should to do if I need rules for body and #wrap ???

Platform: Win 7; Problem Browser: Google Chrome 23.0.1271.64 m;

Last edited 7 years ago by amid2887 (previous) (diff)

comment:4 Changed 7 years ago by amid2887

Also if page has horizontal scroll - helper axisX position has too wrong positioning.

comment:5 Changed 7 years ago by tj.vantoll

Resolution: duplicate
Status: newclosed

Duplicate of #5039.
@amid2887 From your test case this looks like a duplicate of #5039.

Note: See TracTickets for help on using tickets.