Bug Tracker

Opened 12 years ago

Closed 12 years ago

#10063 closed bug (invalid)

Vertical positioning bug

Reported by: yoannesnaud@… Owned by: yoannesnaud@…
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 Rick Waldron

Component: unfiledoffset
Milestone: None1.6.3
Owner: set to yoannesnaud@…
Status: newpending

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.

comment:2 Changed 12 years ago by dmethvin

Milestone: 1.6.3

comment:3 Changed 12 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

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!

Note: See TracTickets for help on using tickets.