Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Issue: DragDropScripts.js invalid offset when drag handle exists inside an absolutely positioned element [21945]

$
0
0
When using Drag Panel Extender for a panel that exists inside an absolutely positioned element, the Drag Drop Manager calculates an incorrect starting point !! The problem appears for browsers other than IE.

Steps to produce the issue:
Open AjaxToolkit SampleWebSite/DragPanel/DragPanel.aspx and set the div with class named "demoarea" to use absolute position, test the page in a browser other than IE to get an instance of GenericDragDropManager created.


Solution:
By looking at DropDropScripts.js I found the following:

1. startDragDrop function inside AjaxControlToolkit.IEDragDropManager.prototype tracks original position of drag visual then set it to "absolute":

dragVisual.originalPosition = dragVisual.style.position;
dragVisual.style.position = "absolute";

2. Then there is a check condition if the drag visual position is absolute:

if (dragVisual.style.position == "absolute") // this will always execute, because it was explicitly set above.

changing this to:

if (dragVisual.style.originalPosition == "absolute") //will fix the issue because it will execute only if drag visual actually has an absolute position.

Best regards,
Mohammad K. Younes.
Comments: Issue closed after 6 YEARS ... Impressing!!

Viewing all articles
Browse latest Browse all 4356

Trending Articles