Opened 3 years ago

Last modified 21 months 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:

Description

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
https://bugs.webkit.org/show_bug.cgi?id=28176
but the framework should provide a workaround for this.
http://bugs.jquery.com/ticket/9699

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: http://jsfiddle.net/6kpJv/5/
The Workaround: http://jsfiddle.net/6kpJv/6/

Change History (2)

comment:1 Changed 2 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 21 months 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.