Skip to main content

Search and Top Navigation

#8589 closed bug (wontfix)

Opened September 21, 2012 07:34PM UTC

Closed September 23, 2012 08:27PM UTC

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.

Attachments (0)
Change History (1)

Changed September 23, 2012 08:27PM UTC by scottgonzalez comment:1

resolution: → wontfix
status: newclosed

jQuery doesn't support zooming.