-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Description
When popup menu is too high to be displayed at a point of mouse click, popup is displayed higher on the height of menu. outerHeight
is used to calculate the height of menu when actual content is hided.
In such situation there are no guarantee that outerHeight
is correct prove
The value reported by .outerHeight() is not guaranteed to be accurate when the element or its parent is hidden. To get an accurate value, ensure the element is visible before using .outerHeight()
In my case outerHeight
is slightly incorrect, so position of popup menu is slightly incorrect as well. I believe, it is better to add open
class first and then calculate the position:
$menu.addClass('open');
tp = this.getPosition(e, $menu);
NPC
Metadata
Metadata
Assignees
Labels
No labels