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 search box expanding width of container #5595

Merged
merged 1 commit into from Jul 30, 2019
Merged

Fix search box expanding width of container #5595

merged 1 commit into from Jul 30, 2019

Commits on Jul 30, 2019

  1. Fix search box expanding width of container

    This fixes a bug with the search box where, when it had a placeholder,
    it would expand the width of the selection container because it was
    too large. This bug was specifically caused by the search box not
    factoring in the padding surrounding it when caclualting the width
    it needed to be, which resulted in the search box extending
    outside of the selection container. This bug was easy to notice if
    your Select2 was set to have 100% width and if the container it was
    held within was not a block element.
    
    This fixes the bug by switching to using `width()` for calculating
    the search width instead of using `innerWidth()`, which ignored the
    surrounding padding.
    
    Fixes #5517
    Closes #5518
    karakum authored and kevin-brown committed Jul 30, 2019
    Copy the full SHA
    71e8940 View commit details
    Browse the repository at this point in the history