Opened 11 years ago

Closed 11 years ago

#8589 closed bug (wontfix)

Position breaks when using window as centering parent in zoomed viewports

Reported by: jchambers Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.position Version: 1.8.23
Keywords: Cc:
Blocked by: Blocking:

Description

When using ui.position to position an element using window as the centering context, the positioned element may wind up in the wrong place if the window is zoomed in or out. I believe the problem is at https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.position.js#L106:

...
else if ( $.isWindow( targetElem ) ) {
	targetWidth = target.width();
	targetHeight = target.height();
	targetOffset = { top: target.scrollTop(), left: target.scrollLeft() };
}
...

If the viewport is zoomed, the width/height of the window will remain constant even though area it displays has changed. This leads to surprising results when using window/height in positioning calculations for zoomed viewports.

This is similar to, but distinct from, #6222.

Change History (1)

comment:1 Changed 11 years ago by Scott González

Resolution: wontfix
Status: newclosed

jQuery doesn't support zooming.

Note: See TracTickets for help on using tickets.