Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup position is incorrect #98

Open
Helen1987 opened this issue Feb 3, 2016 · 0 comments
Open

Popup position is incorrect #98

Helen1987 opened this issue Feb 3, 2016 · 0 comments

Comments

@Helen1987
Copy link

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant