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

Fix gap of upward opening dynamically created contextmenu #291

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

hw-df
Copy link
Contributor

@hw-df hw-df commented Oct 7, 2024

Fixed example:
https://jsfiddle.net/473n9yeu/

The helper function getLineHeight calculates the height of a contextmenu entry by mocking two entries and divide the height of the container by two.
But this does not take the padding of the container into account. Padding must be substracted from the offsetHeight.

close #290

The helper function getLineHeight calculates the height of a
contextmenu entry by mocking two entries and divide the height
of the container by two.
But this does not take the padding of the container into account.
Padding must be substracted from the offsetHeight.
@jonataswalker jonataswalker merged commit e5037a4 into jonataswalker:master Oct 14, 2024
3 checks passed
@jonataswalker
Copy link
Owner

thanks @hw-df

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

Successfully merging this pull request may close these issues.

Gap between mouse and contextmenu when it opens upwards
2 participants