Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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)

Standby.patch (29.1 KB) - added by Jared Jurkiewicz 10 years ago.
Updates to Standby to make it work in many more cases, + events for show/hide + support for widget.attr setting of basic things.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by Jared Jurkiewicz

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.

comment:2 Changed 10 years ago by Douglas Hays

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 10 years ago by Jared Jurkiewicz

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 10 years ago by Jared Jurkiewicz

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 10 years ago by Jared Jurkiewicz

Milestone: tbd1.4

comment:5 Changed 10 years ago by Jared Jurkiewicz

Almost done (with as much as I can do at this point).

comment:6 Changed 10 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [18288]) Adding in many improvements to Standby, works better in RTL, and when targets are nested in scrolling divs. Also works better with ie zoom. fixes #9401

comment:7 Changed 10 years ago by Jared Jurkiewicz

(In [18290]) Missed a couple tabs/spaces issues. refs #9401

Note: See TracTickets for help on using tickets.