Side navigation
#13587 closed bug (notabug)
Opened March 08, 2013 02:24PM UTC
Closed March 08, 2013 02:29PM UTC
Last modified March 08, 2013 02:42PM UTC
removeProp doesn't work twice
Reported by: | xaviermd@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | git |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
On a triggering element that remove a property of another element, if the property is set again by the browser, removeProp don't notice the change
On Chrome : a <detail> has a "open" attribute set by clicking the <summary>. If i remove this attribute via jquery, then set again by clicking <summary>, my second attempt to remove "open" is not working.
Try it with Chrome (sorry) http://jsfiddle.net/dascritch/A3HVG/1/ :
- click the <summary>, it opens the whole <detail>
- click the revealed link, the <detail> is hidden
- click the <summary>, it opens again <detail>
- click the revealed link, the <detail> won't collapse
Attachments (0)
Change History (2)
Changed March 08, 2013 02:29PM UTC by comment:1
_comment0: | The [http://api.jquery.com/removeProp/ docs] specifically say Do not use this method to remove native properties. Why are you using `.removeProp()` on DOM properties? If you pick it you will make it bleed. → 1362753019247145 |
---|---|
resolution: | → notabug |
status: | new → closed |
Changed March 08, 2013 02:42PM UTC by comment:2
I implore you, use .prop
instead: http://jsfiddle.net/A3HVG/2/
The docs specifically say "Do not use this method to remove native properties." Why are you using
.removeProp()
on DOM properties? If you pick it you will make it bleed.