Opened 13 years ago
Closed 13 years ago
#5561 closed defect (wontfix)
dojo._docScroll return wrong left value in IE+BIDI environment when document's overflow set as hidden.
Reported by: | guest | Owned by: | sjmiles |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | HTML | Version: | 1.0 |
Keywords: | html bidi | Cc: | |
Blocked By: | Blocking: |
Description (last modified by )
dijit.getViewport called dojo_docScroll to get the left and top value. dojo._docScroll should simply return 0 back on the left value in this situation When there is no scrollbar here. I hope this can be fixed soon.
Thanks
Attachments (1)
Change History (9)
comment:1 Changed 13 years ago by
Milestone: | 1.0.3 → 1.1 |
---|
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
try below simple html in IE:
<html> <head> <script src='dojo/dojo.js'></script> <script> dojo.require("dijit._base"); function test() {
alert(dijit.getViewport().l);
} dojo.addOnLoad(test); </script> <body dir="rtl" style="direction:rtl;overflow:hidden">
<p> text </p>
</body>
comment:4 Changed 13 years ago by
Milestone: | 1.1 → 1.1.1 |
---|
comment:5 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Priority: | normal → high |
comment:6 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I'm not sure I've read this correctly, but the test case as given alerts '0' which seems to be the behavior the user is asking for.
The implication is that this problem has been fixed otherwise from this ticket.
comment:7 Changed 13 years ago by
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
OK, i found this issue related to window.resize event. You can check it with below test code in IE. Because IE has twice resize events fired when user resize the browser window, it looks like the previous one showed a wrong left value.
This issue mainly breaks dijit.Dialog when resizing window to center the dialog. You can simply change the test_Dialog.html to RTL mode and then resize the IE window to see the problem.
<html> <head> <script> var djConfig = { isDebug: true } </script> <script src="../dojotoolkit/dojo/dojo.js"> </script> <script> dojo.require("dijit._base"); function test() { var resizeHandler = function() { console.debug("left : " + dijit.getViewport().l); } dojo.connect(window, "onresize", resizeHandler); } dojo.addOnLoad(test); </script> </head> <body dir="rtl"> </body> </html>
comment:8 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Thanks for the test case. It appears that IE has some bogus values after the first 'onresize' event; it seems to be one of those cases where IE hasn't completely sorted out the DOM until some idle processing has occurred.
The only solution I have for now is to make it clear that _docScroll (and therefore any number of measuring functions) are not available inside event handlers and necessary effects have to be handled asynchronously.
See attachment for example.
P.S. Quirks/non-quirks tends to be relevant for these discussions and should be part of the ticket text. The example given establishes quirks mode. My attachment uses strict mode. I did not see any different behavior between the modes, but the code paths are slightly different.
Changed 13 years ago by
Attachment: | ie-rtl-viewport-test-5561.html added |
---|
can you provide a test case?