Bug 28176 - "document.documentElement.removeAttribute("style");" occasionally silently fails.
Summary: "document.documentElement.removeAttribute("style");" occasionally silently fa...
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-08-11 07:23 PDT by Vincent Bernardi
Modified: 2022-07-11 16:53 PDT (History)
6 users (show)

See Also:

Test URL (should be working) (35 bytes, text/plain)
2012-01-30 15:07 PST, madcampos
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Bernardi 2009-08-11 07:23:23 PDT
This bug happens on both releases of Safari 3.2.3 (Windows XP/Intel) and Safari 4.0.2 (Mac OS X 10.5.8/Intel and Windows XP/Intel).

When first loaded my script does
document.documentElement.style.display = "none";
to delay the display of the page.

Later it does 

This makes the page display correctly on IE 7,8 and FF3 but on Safari 3 and 4 the page stays blank as if the instruction had been discarded.
This bug mysteriously disapears if the page is loaded while the Error Console is enabled under Safari 4 (both Win and Mac). In that case the page displays correctly.

Suggested workaround: replacing the above line with 
document.documentElement.style.display = "";
makes it work, both with and without the Error Console enabled.
Comment 1 madcampos 2012-01-28 23:42:37 PST
this bug happens on safari and chrome, tested on windows.
element.removeAttribute('style') fails

as a workaround i am setting the attribute style to null, then removing, this seems to make webkit aware of the attribute's existence.

my browser versions are:
Safari v5.1.2
Chrome v16.0.912.77
Comment 2 Alexey Proskuryakov 2012-01-30 12:46:16 PST
Could someone please attach a test case?
Comment 3 madcampos 2012-01-30 15:07:08 PST
Created attachment 124607 [details]
Test URL (should be working)

This url uses the workarround i proposed in the file interface.js around line 89
Comment 4 Kang-Hao (Kenny) Lu 2012-10-15 00:10:50 PDT
This is either duplicated by Bug 99295 or a duplicate of it.