Opened 12 years ago
Closed 12 years ago
#10063 closed bug (invalid)
Vertical positioning bug
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | |
Component: | offset | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
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 (3)
comment:1 Changed 12 years ago by
Component: | unfiled → offset |
---|---|
Milestone: | None → 1.6.3 |
Owner: | set to yoannesnaud@… |
Status: | new → pending |
comment:2 Changed 12 years ago by
Milestone: | 1.6.3 |
---|
comment:3 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
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!
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.