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

max-height/offsetHeight Calculation Issue, Fixes #2581 #2700

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

terryaney
Copy link

@terryaney terryaney commented Jan 19, 2022

Fixes #2581

If the number of items in the dropdown > this.options.size, then the following line runs:

menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding.vert;

However, liHeight is calculated wrong if the first item is hidden or if first item has text of ''.

Before adding the temporary newElement to the body to calculate height, I always show the first item (I didn't check to see if hidden), and if first items text = '', I set it to   (probably wouldn't need a check here either).

Have created a new branch/commit for previous attempt at PR. Was able to run grunt lint successfully.

Original PR with some commentary about lint issues

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.

None yet

1 participant