Ticket #8425 (closed bug: notabug)
UI Position doesn't handle fixed elements correctly
|Reported by:||Jens Roland||Owned by:|
The Position utility script doesn't account for the target element being fixed to the viewport (position:fixed).
The source element (the one we are trying to position next to the target, e.g. a tooltip) needs to become fixed if the target is, in order to stay adjacent to it if the user subsequently scrolls down the page.
Proposed fix: On line 213, add:
if (target.css('position')=='fixed') elem.css('position','fixed');
Demo with implemented fix: http://jsfiddle.net/gJpNT/1/
I will submit a pull request right away.
- Status changed from new to closed
- Resolution set to invalid