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

liHeight does not consider custom option content when computing li height #2393

Closed
Mobe91 opened this issue Feb 14, 2020 · 4 comments
Closed

Comments

@Mobe91
Copy link
Contributor

Mobe91 commented Feb 14, 2020

Currently, liHeight creates an artificial li element with static content to compute its offsetHeight. This height is later used for virtual scrolling.
However, when a user supplies custom content via the data-content attribute, the current approach does not yield the correct li height.

@caseyjhol
Copy link
Member

Bug reports must include a live demo of the problem. Per our contributing guidelines, please create a reduced test case (you can use our preconfigured Plunker), and report back with:

  • your link
  • Bootstrap version
  • bootstrap-select version
  • specific browser and OS details.

If you're not using the latest version of bootstrap-select, please try that as well.

@Mobe91
Copy link
Contributor Author

Mobe91 commented Apr 24, 2020

Here is a reproducer: https://plnkr.co/edit/MAlf9YRQoz948SPM

Bootstrap version: 4.1.0
Bootstrap-select version: v1.13.15
Tested in Firefox on Windows 10

I have changed the first select to use custom html option content + virtual scroll. Just scroll to the very end of the option list and you will see blank content caused by wrong li height calculation. The reproducer is fixed by applying the changes from this PR.

@caseyjhol
Copy link
Member

Released in v1.13.16!

@RebelTank
Copy link

Adding in a disabled first option and setting data-hide-disabled="false" breaks this.

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 a pull request may close this issue.

3 participants