Bug Tracker

Opened 13 years ago

Closed 12 years ago

#1205 closed bug (wontfix)

Position of Droppables within overflow:auto containers not calculated well!

Reported by: c_t Owned by: stefan
Priority: major Milestone: 1.1.3
Component: interface Version: 1.1.2
Keywords: interface droppable getposition overflow auto Cc:
Blocked by: Blocking:

Description

The position of Droppables, that are placed within a container that has the css-property overflow:auto set, is not calculated well when the droppable area has been scrolled.

The reason is, that jQuery.iDrop.highlight() and jQuery.iDrop.remeasure() both use jQuery.iUtil.getPositionLite() which does not take into account scrolling-offsets.

Changing these function calls to getPosition() fixed the problem for me. However I know, that getPosition() is much slower than the lite-version.

So maybe a configuration variable should be Introduced, like script.aculo.us does: something like Position.includeScrollOffsets .
If set to true, the slow getPosition() method is used, which considers scrolling offsets.
If set to false (which should be default) the fast getPositionLite() is used.

Change History (2)

comment:1 Changed 13 years ago by gregmac

This problem also affects #1437

Patch to apply the changes in this ticket:

Index: idrop.js
===================================================================
--- idrop.js	(revision 3)
+++ idrop.js	(working copy)
@@ -89,7 +89,7 @@
 				if (jQuery(jQuery.iDrag.dragged).is('.' + iEL.dropCfg.a)) {
 					if (iEL.dropCfg.m == false) {
 						iEL.dropCfg.p = jQuery.extend(
-							jQuery.iUtil.getPositionLite(iEL),
+							jQuery.iUtil.getPosition(iEL),
 							jQuery.iUtil.getSizeLite(iEL)
 						);//jQuery.iUtil.getPos(iEL);
 						iEL.dropCfg.m = true;
@@ -135,7 +135,7 @@
 				var iEL = jQuery.iDrop.zones[i].get(0);
 				if (jQuery(jQuery.iDrag.dragged).is('.' + iEL.dropCfg.a)) {
 					iEL.dropCfg.p = jQuery.extend(
-						jQuery.iUtil.getPositionLite(iEL),
+						jQuery.iUtil.getPosition(iEL),
 						jQuery.iUtil.getSizeLite(iEL)
 					);
 					if (iEL.dropCfg.ac) {

comment:2 Changed 12 years ago by scott.gonzal

Resolution: wontfix
Status: newclosed

Interface is no longer supported; consider switching to jQuery UI.

Note: See TracTickets for help on using tickets.