Skip to content

Fix gap of upward opening dynamically created contextmenu - #302

Merged
jonataswalker merged 2 commits into
jonataswalker:masterfrom
hw-df:fix-lineheight
Jun 17, 2026
Merged

Fix gap of upward opening dynamically created contextmenu#302
jonataswalker merged 2 commits into
jonataswalker:masterfrom
hw-df:fix-lineheight

Conversation

@hw-df

@hw-df hw-df commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

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.

Closes #301

Related #290
Related #291

hw-df and others added 2 commits June 5, 2026 08:43
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.
…irectly

Covers the upward-menu gap fix in getLineHeight: the measured line
height must be independent of the container's vertical padding. Also
drops the unnecessary `globalThis.` qualifier to satisfy lint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jonataswalker
jonataswalker merged commit c20ea3c into jonataswalker:master Jun 17, 2026
3 checks passed
@jonataswalker

Copy link
Copy Markdown
Owner

thank you very much @hw-df and sorry the delay

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.

[Bug]: Fix from PR #291 is missing from current master branch

2 participants