Opened 5 years ago

Closed 5 years ago

#9797 closed bug (worksforme)

CSS overflow causes jQuery UI Position to be off by a noticeable amount of pixels.

Reported by: cesar.rojas Owned by: cesar.rojas
Priority: minor Milestone: none
Component: ui.position Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:

Description

When any DOM element is positioned close to the end of css overflow window, the position may be off by a small but noticeable amount of pixels.

Below our pictures of the jQuery Position Online Demo running on the latest version of chrome. Behavior is the same accross all modern browsers.

Settings No image "//s19.photobucket.com/user/Uber_bum/media/jQuery%20UI%20Bug/Settings_zps72a92e3e.png.html" attached to path http

Undesired Offset No image "//i19.photobucket.com/albums/b185/Uber_bum/jQuery%20UI%20Bug/Bug_zpsf0c3428d.png" attached to path http

Change History (5)

comment:1 Changed 5 years ago by cesar.rojas

[]

Version 0, edited 5 years ago by cesar.rojas (next)

comment:2 Changed 5 years ago by cesar.rojas

Last edited 5 years ago by cesar.rojas (previous) (diff)

comment:3 Changed 5 years ago by Scott González

Owner: set to cesar.rojas
Status: newpending

As the red box says, please provide a reduced test case showing the problem. Screenshots can't be debugged.

comment:4 in reply to:  3 Changed 5 years ago by cesar.rojas

Status: pendingnew

I can't remove the red boxes. My last comment provides the screenshots that illustrate the problem. This issue exists in my project and the JQuery UI Position Live demo; which is why I don't provide a jsfiddle because you can just go to the live demo to reproduce the error.

Steps to reproduce. 1) Go to the jQuery UI Position Live Demo site. http://jqueryui.com/position/

2) Set "my" to "left center"

3) Set "at" to "right center"

4) set "collision" to "flip flip"

5) drag the orange box to the far right of the iFrame so that the overflow appears.

6) You will see that the DOM objects being positioned by the position utility has an erroneous offset that makes it appear a bit off to the left.

Note that in my project I only set the position once, so it has nothing to do with how the live demo is setting the position as you drag it. The problem lies when you use the position utility on an object that is close to the css overflow.

comment:5 Changed 5 years ago by Scott González

Resolution: worksforme
Status: newclosed

The only offset I see occurs when the browser scrolls during the drag, which occurs after the positioning.

Note: See TracTickets for help on using tickets.