#9500 closed bug (duplicate)
$('html, body').removeAttr('style') fails in Webkit browsers.
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | attributes | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
While doing
$('html, body').css('overflow', 'hidden');
It works, but until this part (in Webkit browsers) it fails to do this:
$('html, body').removeAttr('style');
jsFiddle test: http://jsfiddle.net/9CLfd/
Change History (4)
comment:1 Changed 12 years ago by
Component: | unfiled → attributes |
---|---|
Priority: | undecided → low |
Status: | new → open |
comment:2 Changed 12 years ago by
Ah I see now. Thanks for that fix. Surely this "bug" can be fixed in the jQuery core that remove asynchronous styles?
comment:3 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | open → closed |
removeAttribute('style') even without this overflow conversion has problems, so I'll close this ticket as a dup of the more enveloping issue.
Note: See
TracTickets for help on using
tickets.
This is legit, but it's a quirk in webkit: http://jsfiddle.net/timmywil/9CLfd/2/
overflow is automatically converted asynchronously to overflow-x/overflow-y, which happens after the removeAttr call. We can fix by adding a call to attr to set the style tag to empty string before removal, but I'd hate to add another function call to every removeAttr.