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

Resolve issue #607 with utils::calcWidthOfInput() #608

Merged
merged 1 commit into from
Oct 2, 2019

Conversation

aiwebb
Copy link
Contributor

@aiwebb aiwebb commented Jul 1, 2019

Description

This change modifies the utils::calcWidthOfInput() function to transfer paddingLeft and paddingRight from the source input to the test input explicitly, rather than relying on the shorthand property padding.

Motivation and Context

See #607 - shorthand CSS properties are not supported in window.getComputedStyle() except in Chrome (due to a departure from CSS spec in favor of usability).

This results in width being undercounted in Firefox for inputs that use padding.

How Has This Been Tested?

Tested in Chrome and Firefox to confirm padding is now accounted for correctly in both.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@aiwebb
Copy link
Contributor Author

aiwebb commented Jul 15, 2019

@jshjohnson - is there anything else I should supply for this?

@jeriah-formio
Copy link

@jshjohnson any update on this PR?

@jshjohnson jshjohnson merged commit 39b6eed into Choices-js:master Oct 2, 2019
@jshjohnson
Copy link
Collaborator

Thanks 👍

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.

3 participants