Skip to main content

Bug Tracker

Side navigation

#2493 closed bug (duplicate)

Opened March 12, 2008 07:06AM UTC

Closed November 13, 2010 07:27PM UTC

Last modified November 13, 2010 07:27PM UTC

IE 7 and dragging with Page Zoom active

Reported by: ledents Owned by: brandon
Priority: minor Milestone:
Component: dimensions Version:
Keywords: Cc:
Blocked by: Blocking:
Description

I must note that I have noticed this behavior on each page I tested which provide drag/drop functionality (not only JQuery UI related):

Whenever dragging an object in IE7 and page Zoom is active the

position of the dragged object gets shifted by a factor of the distance between the point where dragging was initiated and the page Zoom factor.

This is due to IE7 mouse events attributes clientX/Y not being re-scaled properly by the zoom factor. Firefox 3.0b3 does not have this problem (although also implementing page Zooming facility).

It seams to be a IE7 bug and not only JQuery UI related.

(There might although be a work around for this problem)

Because offsetX/Y are correctly scaled it is theoretical possible to

calculate the pageZoom factor:

pageZoomFactor = mouseEvent.clientX / (obj.abolutePosition_X +
obj.borderSize + mouseEvent.offsetX)
pageZoomFactor = mouseEvent.clientY / (obj.abolutePosition_Y +
obj.borderSize + mouseEvent.offsetY)

It could then be used to re-scale the clientX/Y properties of the mouse events in IE to correctly calculate the new objects position:

However this suppose that it is possible to correctly calculate the

absolute coordinates of the dragged object!

Attachments (0)
Change History (5)

Changed March 14, 2008 06:50PM UTC by paul comment:1

component: uidimensions

This should be fixed in dimensions.

Changed March 14, 2008 06:50PM UTC by paul comment:2

owner: paulbrandon

Changed July 07, 2008 11:44AM UTC by bandyman comment:3

I've recently encountered this issue. I tested Opera which supports zoom and all's fine there. Also FF3 release version is fine. Would be good to test latest Safari which (I think) also zooms.

Thank you IE7.

Yet another broken implementation courtesy of Microsoft.

Why couldn't they correctly transform mouse coordinates back to the original screen scale? Easy to do in a well-implemented rendering engine...

The workaround/hack for this will most likely be ugly. Hopefully IE8 will zoom a little more gracefully. IE7's zoom is also nicely breaking my page layout. I'm not sure whether it's incorrectly scaling the Flash header, or the absolutely-positioned <div> to the right of it - but it's now overlapping the two elements.

Of course, "zoom" is itself a hack to workaround HTML's lack of decent support for intelligent and fluid dynamic layouts. No wonder .pdf is still such a popular format! ;) </rant>

Changed November 13, 2010 07:27PM UTC by dmethvin comment:4

resolution: → duplicate
status: newclosed
summary: IE 7 and dragging with PageZoom activeIE 7 and dragging with Page Zoom active

Changed November 13, 2010 07:27PM UTC by dmethvin comment:5

Duplicate of #5565.