#6973 closed bug (notabug)
position: issue when setting top left when div previously positioned using bottom right
Reported by: | jfremy | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.position | Version: | 1.8.9 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
JSFiddle: http://jsfiddle.net/jfremy/KG7x7/
On Chrome / Safari, if you have a position fixed div whose initial position is set using bottom right and has a preset width and height and you try to change its position using top left coordinates, the div is not correctly positioned.
Firefox and IE seem to work, but I think this is luck
The problem arises because you end up setting left, right, bottom, top, width and height css properties.
I think (but I understand that everybody might not think the same) that when using position, other "position" properties should be set to auto to avoid this kind of issue.
Maybe by setting systematically bottom and right to auto (since the position code seems to always be setting the top / left properties)
Change History (2)
comment:1 Changed 11 years ago by
Component: | ui.core → ui.position |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 11 years ago by
See: http://bugs.jquery.com/ticket/7701 - while it might make sense to make that modification in your own application, having that kind of "automagic" operation, to me, would make it inconsistant.
This is as designed. jQuery UI's .position() has the same result as jQuery core's .offset().