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

default calculatePosition implementation gets the width wrong #1113

Closed
tochoromero opened this issue Mar 17, 2020 · 1 comment · Fixed by #1114
Closed

default calculatePosition implementation gets the width wrong #1113

tochoromero opened this issue Mar 17, 2020 · 1 comment · Fixed by #1114
Labels

Comments

@tochoromero
Copy link
Contributor

When you use append-to-body the default implementation for calculatePosition calculates the width of the dropdownList like this:

context.$refs.toggle.clientWidth + 'px'

The problem with that is that it doesn't seem to take into consideration the padding and borders of the toggle element. Instead we should use the width value you already have available because of the getBoundingClientRect() you use for the top and left positions.

Screen Shot 2020-03-17 at 9 39 48 AM

tochoromero added a commit to tochoromero/vue-select that referenced this issue Mar 17, 2020
Use the `width` from `getBoundingClientRect` as the default for `calculatePosition`.

Fixes sagalbot#1113
@github-actions
Copy link

🎉 This issue has been resolved in version 3.9.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant