I thought i would post this as it may help someone or someone might be good enough to include it in the next release version of the toolkit.
The Drag Panel has a bug in the current release version that causes script errors and i have made a minor modifications to the source to resolve it.
I accept that this probably isn't the best way to resolve the issue however it works nicely with the current build (VS 2008) untill such a time as someone implements a "proper" fix. (that doesn't mean this is a hack btw!)
Bug: Error - "scrollLeft" is null or not an object
Replication Steps:
Start dragging a panel around the browser, move the mouse outside of the browser window (while still holding the button down) and release. When the mouse is moved back over the browser window the Drag Panel will be "stuck" to the cursor. Click to "drop" the
panel. The error will occur on click.
Fault: When the mouse leaves the browser window the "active drag panel element" is nulled (i didn't find where) so when the mouseup event is fired after the click an attempt is made to release the panel at it's current location but there is insufficent object
checking and it explodes.
Fix:
In the source file "DragDropScripts.debug.js" (under "Compat\DragDrop" in the solution) locate the function "_drag" (around line 325) it reads:
_drag: function(isInitialDrag) {
var ev = window._event;
var mousePosition = { x: ev.clientX, y: ev.clientY };
...
}
Add an additional check at the begining of the function to ensure there is an active drag target:
_drag: function(isInitialDrag) {
if (this._activeDragVisual) {
var ev = window._event;
var mousePosition = { x: ev.clientX, y: ev.clientY };
...
}
}
Notes:
As i mentioned previously this might not be the most elegant of fixes however it does resolve the issue (in my application at least, however, it should work generally).
This should probably be posted somewhere else on the forum (i.e. a bugs section) however i didn't see an obvious place to put it - if a mod wants to move it please feel free.
I hope someone finds the time to either fix it properly in the toolkit or at minimum include this fix for future releases.
freakyer
0 Points
1 Post
DragPanel Bug Fixed
Jul 14, 2009 09:56 AM|LINK
Hi all,
I thought i would post this as it may help someone or someone might be good enough to include it in the next release version of the toolkit.
The Drag Panel has a bug in the current release version that causes script errors and i have made a minor modifications to the source to resolve it.
I accept that this probably isn't the best way to resolve the issue however it works nicely with the current build (VS 2008) untill such a time as someone implements a "proper" fix. (that doesn't mean this is a hack btw!)
Bug:
Error - "scrollLeft" is null or not an object
Replication Steps:
Start dragging a panel around the browser, move the mouse outside of the browser window (while still holding the button down) and release. When the mouse is moved back over the browser window the Drag Panel will be "stuck" to the cursor. Click to "drop" the panel. The error will occur on click.
Fault:
When the mouse leaves the browser window the "active drag panel element" is nulled (i didn't find where) so when the mouseup event is fired after the click an attempt is made to release the panel at it's current location but there is insufficent object checking and it explodes.
Fix:
In the source file "DragDropScripts.debug.js" (under "Compat\DragDrop" in the solution) locate the function "_drag" (around line 325) it reads:
_drag: function(isInitialDrag) {
var ev = window._event;
var mousePosition = { x: ev.clientX, y: ev.clientY };
...
}
Add an additional check at the begining of the function to ensure there is an active drag target:
_drag: function(isInitialDrag) {
if (this._activeDragVisual) {
var ev = window._event;
var mousePosition = { x: ev.clientX, y: ev.clientY };
...
}
}
Notes:
As i mentioned previously this might not be the most elegant of fixes however it does resolve the issue (in my application at least, however, it should work generally).
I hope someone finds the time to either fix it properly in the toolkit or at minimum include this fix for future releases.This should probably be posted somewhere else on the forum (i.e. a bugs section) however i didn't see an obvious place to put it - if a mod wants to move it please feel free.
I also hop someone finds this usefull!
Happy Coding!
wrc3
Member
17 Points
4 Posts
Re: DragPanel Bug Fixed
Jul 14, 2009 04:10 PM|LINK
You can also try styling the div or panel that is dragged with overflow-x:hidden;
ralger9
Member
12 Points
1 Post
Re: DragPanel Bug Fixed
Jul 14, 2009 11:56 PM|LINK
We have had a similar issue and recompiling the AjaxControlTookit code with the change fixed it.
I got the source code at http://ajaxcontroltoolkit.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27326
lownotes
Member
2 Points
1 Post
Re: DragPanel Bug Fixed
Jul 28, 2009 04:03 PM|LINK
The fix worked like a champ. Thanks!
Bonzol
Member
104 Points
91 Posts
Re: DragPanel Bug Fixed
Sep 18, 2009 02:39 AM|LINK
I have downloaded and edited the source code,, how do I apply the newly edited source code to my website?
angolop
Member
2 Points
1 Post
Re: DragPanel Bug Fixed
Mar 12, 2010 02:28 PM|LINK
this problem happens to me but when i try to move the mouse after i release the modal... any ideas???