Bug Tracker

Ticket #2493 (closed bug: duplicate)

Opened 7 years ago

Last modified 4 years ago

IE 7 and dragging with Page Zoom active

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

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!

Change History

comment:1 Changed 7 years ago by paul

  • Component changed from ui to dimensions

This should be fixed in dimensions.

comment:2 Changed 7 years ago by paul

  • Owner changed from paul to brandon

comment:3 Changed 6 years ago by bandyman

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>

comment:4 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate
  • Summary changed from IE 7 and dragging with PageZoom active to IE 7 and dragging with Page Zoom active

comment:5 Changed 4 years ago by dmethvin

Duplicate of #5565.

Note: See TracTickets for help on using tickets.