Opened 4 years ago

Last modified 3 years ago

#13920 new defect

removeAttr() sometimes silently fails in webkit

Reported by: mlucas Owned by: elazutkin
Priority: high Milestone: 2.0
Component: HTML Version: 1.7.0b1
Keywords: removeAttr removeAttribute webkit chrome safari Cc:
Blocked by: Blocking:


Trying to remove a DOMElement's "style" attribute with dojo.removeAttr() in a dojo.Animation.onEnd function fails silently in
Chrome 13.0 and Safari 5.05.

This is probably only a problem of webkit
but the framework should provide a workaround for this.

As stated in the jquery ticket - a simple workaround is to
first empty the node's attribute and trying to remove it afterwards.

Here are two JSFiddles to punch around:
The Problem:
The Workaround:

Change History (2)

comment:1 Changed 4 years ago by elazutkin

I am not sure if it is even legal to remove W3C mandate DOM attributes. I believe it should work only for custom attributes. I'll go over the relevant doc before making my decision.

comment:2 Changed 3 years ago by csnover

  • Milestone changed from 1.8 to 2.0

1.8 has been tagged; moving all outstanding tickets to next major release milestone.

Note: See TracTickets for help on using tickets.