Opened 8 years ago
Closed 8 years ago
#16586 closed defect (invalid)
Standby bug on IE9
Reported by: | nunocardoso | Owned by: | nunocardoso |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | HTML | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Hi,
I found an IE9 only bug with the Standby.js overlay widget. I am using Dojo 1.7.3, but I believe the bug is also on 1.8.3, as the Standby.js file still has the same code. In the _disableOverflow() function, we can see this IE-only code:
if(has("ie") && !has("quirks")){ // IE will put scrollbars in anyway, html (parent of body) // also controls them in standards mode, so we have to // remove them, argh. if(body.parentNode && body.parentNode.style && body.parentNode.style.overflow){ this._oldBodyParentOverflow = body.parentNode.style.overflow; }else{ try{ this._oldBodyParentOverflow = domStyle.set(body.parentNode, "overflow"); }catch(e){ this._oldBodyParentOverflow = "scroll"; } } domStyle.set(body.parentNode, "overflow", "hidden"); }
In the IE9 inspector, calling domStyle.set(body.parentNode, "overflow") returns a JS associative array, not a string. Later on, on the _enableOverflow() function, that backed-up array is being assigned to body.parentNode.style.overflow, which is expecting a string. The overflow value is kept as "hidden", and that causes the scrollbars to be kept hidden, after the overlay is removed.
A quick fix I made on my code was to change on the _enableOverflow() function:
body.parentNode.style.overflow = this._oldBodyParentOverflow.overflow;
Instead of:
body.parentNode.style.overflow = this._oldBodyParentOverflow;
And it works.
Change History (3)
comment:1 Changed 8 years ago by
Component: | General → HTML |
---|---|
Owner: | set to Eugene Lazutkin |
comment:2 Changed 8 years ago by
Owner: | changed from Eugene Lazutkin to nunocardoso |
---|---|
Status: | new → pending |
On IE9 I loaded dojo/tests/dom-style.html and then in the console ran:
require(["dojo/dom-style"], function(style){ console.log(style.get(document.body.parentNode, "overflow")); });
It works correctly, returning "visible".
Furthermore, I tried dojox/widget/tests/test_Standby.html on trunk, adding a console.log() to the code in question, and when clicking "click to show the Standby overlay on body for 5 seconds", it works fine, and the console.log() prints "visible", not a hash.
That button also works fine on the 1.8 branch, and the 1.7 branch.
Can you provide a test case that's failing? If not, will close as "works for me".
comment:3 Changed 8 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
I'm assume you meant domStyle.get(). So even though the error manifests in dojox/widget/Standby you are saying it's a bug in the core DOM code.