Ticket #10063 (closed bug: invalid)
Vertical positioning bug
| Reported by: | yoannesnaud@… | Owned by: | yoannesnaud@… |
|---|---|---|---|
| Priority: | undecided | Milestone: | |
| Component: | offset | Version: | 1.6.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Hi,
when using this tooltip we found that the area displaying the tooltip will either be truncated at the top or bottom of the window.
To reproduce:
When the window is downsized, and the tooltip anchor near the top (or bottom) of the scrollable area. When the mouse over event is fired, the vertical position (top) is wrongly calculated and the result is the tooltip window being truncated.
To fix this we had to change the vertical positioning calculation from
check vertical position are we outside of the top visible area? if (h.offsetTop < v.y) {
top = v.y + settings(current).top; are we outside the bottom visible area
} else if (h.offsetTop + h.offsetHeight > v.cy + v.y) {
top = v.cy + v.y - h.offsetHeight - settings(current).top; helper.parent.css({top: top + 'px'}).addClass("viewport-bottom");
}
Yoann.
Change History
comment:1 Changed 21 months ago by rwaldron
- Owner set to yoannesnaud@…
- Status changed from new to pending
- Component changed from unfiled to offset
- Milestone changed from None to 1.6.3
comment:3 Changed 21 months ago by trac-o-bot
- Status changed from pending to closed
- Resolution set to invalid
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.