Opened 10 years ago
Closed 10 years ago
#13718 closed bug (cantfix)
jQuery 1.8 craching on .removeAttr('rowspan') in IE7 (or IE9 in ie7 mode)
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
this code calls js error in IE7
var parentCell = $(this).parent(); //this - is a anchor(<a>) element in table cell (<td>) element necessary parentCell.removeAttr('rowspan');
jquery crushing code:
// Use this for any attribute in IE6/7 // This fixes almost every IE6/7 issue nodeHook = jQuery.valHooks.button = { get: function( elem, name ) { var ret; ret = elem.getAttributeNode( name ); return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? ret.value : undefined; }, set: function( elem, value, name ) { // Set the existing or create a new attribute node var ret = elem.getAttributeNode( name ); if ( !ret ) { ret = document.createAttribute( name ); elem.setAttributeNode( ret ); } return ( ret.value = value + "" ); // !!! crashed here. ret.value = 40, value = "" } };
stack trace:
removeAttr
each
jQuery.each
jQuery.removeAttr
jQuery.attr
nodeHook.set
Change History (4)
comment:1 Changed 10 years ago by
comment:2 follow-up: 3 Changed 10 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
I can't get jsfiddle to run at all with IE7, or with IE10 in IE7 CV.
As a workaround I would suggest setting the attribute to "1", does that work?
comment:3 Changed 10 years ago by
Status: | pending → new |
---|
Replying to dmethvin:
As a workaround I would suggest setting the attribute to "1", does that work?
Yes it works. Thank you!
comment:4 Changed 10 years ago by
Resolution: | → cantfix |
---|---|
Status: | new → closed |
Since there's a reasonable workaround I'll close this.
Note: See
TracTickets for help on using
tickets.
More simplier example on jsfiddle: http://jsfiddle.net/8f2rN/
also don't work in IE7