#9401 closed defect (fixed)
dojox/Standby: incorrect positions when IE zoom not 100%
Reported by: | Douglas Hays | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | DojoX Widgets | Version: | 1.3.0 |
Keywords: | Cc: | bill | |
Blocked By: | Blocking: |
Description
Run dojox/widget/tests/test_Standby.html using IE7
Press ctrl+ a couple of times to increase the zoom past 100%.
Now run any of the tests. Every animation overlay is in the wrong position.
Attachments (1)
Change History (8)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Cc: | bill added |
---|
2 issues:
1) the StandBy? widget is calling dojo.coords and not specifying the includeScroll boolean, but then adding it on manually
2) IE7 is returning incorrect *Left and *Top values but correct *Width and *Height.
I think dojo.coords should be handling this. Using the a11y dummy div (and keeping it around instead of destroying it) I hacked wai.js and was able to fudge the return values:
if(dojo.isIE == 7){ var orig_abs = dojo._abs; dojo._abs = function(/*DomNode*/node, /*Boolean?*/includeScroll){ var _ie7zoom = -div.offsetTop / 1000; var ret = orig_abs(node, includeScroll); ret.x = Math.floor((ret.x+0.9) / _ie7zoom); // 0.9 is for rounding problems where 95% zoom = 0.949 ret.y = Math.floor((ret.y+0.9) / _ie7zoom); return ret; } }
Of course we'll need to discuss how and if this should really be fixed. At the very least the StandBy? widget could fudge the values but I think doing it globally would be better.
comment:3 Changed 12 years ago by
I actually have a revised version I'm working on that does use the scrollbar attribute for coords, so that issue should go away (I actually wasn't aware coords took that option when I initially wrote it. The code I sent you to review included the switchover to coords with includeScrollbar true.
And yes, Standby could fudge it, but a global fix is better. :)
Changed 12 years ago by
Attachment: | Standby.patch added |
---|
Updates to Standby to make it work in many more cases, + events for show/hide + support for widget.attr setting of basic things.
comment:4 Changed 12 years ago by
Milestone: | tbd → 1.4 |
---|
comment:6 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Any suggestions on that, then, Doug? I'm using Dojo's functions to determine node positions dynamically. This implies that dojo's own coords functions return incorrectly.