Search and Top Navigation
#7538 closed bug (fixed)
Opened July 07, 2011 02:23PM UTC
Closed January 28, 2013 01:59PM UTC
Last modified January 29, 2013 08:10AM UTC
Draggable: IE7 crashes when draggable is inside of tabs
Reported by: | JAAulde | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.1 |
Component: | ui.draggable | Version: | 1.8.14 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
- jQuery 1.6.1, 1.6.2
- jQuery UI 1.8.14
- Internet Explorer 7
- Windows XP
Reduced test case: http://jsfiddle.net/JAAulde/5Cujz/
When using IE7 (only in IE7--no other browser, not even IE8 in 7 compat mode) on a page with draggable (UI DnD) elements inside of a tab (UI tabs), the first drag of any particular draggable is fine. Any subsequent drag of the same element, however, causes IE to crash.
We traced it all the way down through the creation of the clone helper and into the call to removeAttr() which is made against the clone for stripping off the ID. Inside of removeAttr(), the check for jQuery.support.getSetAttribute
comes up false, so jQuery attempts to clear the attribute and then retrieve it from the DOM to pass it to elem.removeAttributeNode()
. That call to elem.removeAttributeNode
is where IE crashes.
Attachments (0)
Change History (12)
Changed July 07, 2011 02:40PM UTC by comment:1
Changed July 07, 2011 02:46PM UTC by comment:2
keywords: | → 1.6-support |
---|
Changed July 19, 2011 07:25AM UTC by comment:3
I can confirm the issue, but it happens also on setting the attribut with the attr() function. (4th - 5th call)
Thank you for pointing it out. Degrading to jquery 1.5.1 is a good workaround
Changed July 19, 2011 02:12PM UTC by comment:4
I decided to stick with jQuery 1.6.2 and the following monkey patch:
( function( global ) { var jQuery, origRemoveAttr; if( global.jQuery ) { jQuery = global.jQuery; origRemoveAttr = jQuery.removeAttr; jQuery.removeAttr = function( elem, name ) { if( ! jQuery.support.getSetAttribute && ( '' + name ).toUpperCase() === 'ID' ) { elem.removeAttribute( name ); } else { origRemoveAttr.apply( jQuery, arguments ); } }; } }( window ) );
Changed July 25, 2011 05:07PM UTC by comment:5
Core ticket: http://bugs.jquery.com/ticket/9905
Changed August 01, 2011 02:24PM UTC by comment:6
status: | new → open |
---|
Changed October 11, 2012 02:49PM UTC by comment:7
milestone: | 1.9.0 → 2.0.0 |
---|
Changed October 28, 2012 09:04PM UTC by comment:8
summary: | IE7 crashes when draggable is inside of tabs → Draggable: IE7 crashes when draggable is inside of tabs |
---|
Changed January 28, 2013 01:12PM UTC by comment:9
I have excatly the same problem. First drag works and second doesn't. Also the problem only exist when I'm using IE7. I also had my draggables inside a tab, but removing tabs didn't fix the problem.
I'm using draggable and droppable to move blocks of elements from a div to another. When moved, I want that a clone (ui.draggable.clone(false, false)) of dragged element returns to the original spot. When I start dragging the element again (the original one, not the clone), IE7 crashes. Removing the cloning part of the code fixes the problem.
I've tested that IE8, IE9 and IE10 works ok, as well as the newest Chrome and Firefox. Only IE7 doesn't.
- Browser: IE 7
- jQuery: jquery-1.7.2.min
- jQuery UI: jquery-ui-1.8.21
Changed January 28, 2013 01:59PM UTC by comment:10
keywords: | 1.6-support |
---|---|
milestone: | 2.0.0 → 1.9.1 |
resolution: | → fixed |
status: | open → closed |
Please upgrade to the latest versions of jQuery and jQuery UI.
Changed January 29, 2013 08:10AM UTC by comment:11
Replying to [comment:9 nikomakela]:
I have excatly the same problem. First drag works and second doesn't. Also the problem only exist when I'm using IE7. I also had my draggables inside a tab, but removing tabs didn't fix the problem. I'm using draggable and droppable to move blocks of elements from a div to another. When moved, I want that a clone (ui.draggable.clone(false, false)) of dragged element returns to the original spot. When I start dragging the element again (the original one, not the clone), IE7 crashes. Removing the cloning part of the code fixes the problem. I've tested that IE8, IE9 and IE10 works ok, as well as the newest Chrome and Firefox. Only IE7 doesn't. - Browser: IE 7 - jQuery: jquery-1.7.2.min - jQuery UI: jquery-ui-1.8.21
Okay, mine script is working now. I was adding a boolean to ui.draggable.data() and when I read it, I did it like this:
if (ui.draggable.data().createdWithBuilder == true){ ...
The dot-notation worked for every browser except IE7. When I read the value like I'm doing in following code, everything is working ok.
if (ui.draggable.data("createdWithBuilder") == true){ ...
Changed January 29, 2013 08:10AM UTC by comment:12
Replying to [comment:9 nikomakela]:
I have excatly the same problem. First drag works and second doesn't. Also the problem only exist when I'm using IE7. I also had my draggables inside a tab, but removing tabs didn't fix the problem. I'm using draggable and droppable to move blocks of elements from a div to another. When moved, I want that a clone (ui.draggable.clone(false, false)) of dragged element returns to the original spot. When I start dragging the element again (the original one, not the clone), IE7 crashes. Removing the cloning part of the code fixes the problem. I've tested that IE8, IE9 and IE10 works ok, as well as the newest Chrome and Firefox. Only IE7 doesn't. - Browser: IE 7 - jQuery: jquery-1.7.2.min - jQuery UI: jquery-ui-1.8.21
Okay, mine script is working now. I was adding a boolean to ui.draggable.data() and when I read it, I did it like this:
if (ui.draggable.data().createdWithBuilder == true){ ...
The dot-notation worked for every browser except IE7. When I read the value like I'm doing in following code, everything is working ok.
if (ui.draggable.data("createdWithBuilder") == true){ ...
Your issue is that jQuery UI 1.8.14 does not support jQuery 1.6.1 or 1.6.2 yet. This is good to know though for when 1.6.x is supported.