We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The issue is in src/scripts/lib/utils.js:calcWidthOfInput():
src/scripts/lib/utils.js:calcWidthOfInput()
const inputStyle = window.getComputedStyle(input); if (inputStyle) { testEl.style.fontSize = inputStyle.fontSize; testEl.style.fontFamily = inputStyle.fontFamily; testEl.style.fontWeight = inputStyle.fontWeight; testEl.style.fontStyle = inputStyle.fontStyle; testEl.style.letterSpacing = inputStyle.letterSpacing; testEl.style.textTransform = inputStyle.textTransform; testEl.style.padding = inputStyle.padding; // <--------- }
The spec for window.getComputedStyle() stipulates that shorthand properties like padding should be empty in the return object.
window.getComputedStyle()
padding
Firefox adheres to spec on this, so inputStyle.padding is always "". This results in input padding not being accounted for in Firefox.
inputStyle.padding
""
Chrome departs from spec in favor of usability, so inputStyle.padding reflects the actual padding settings of the element.
The solution is to change this to copy paddingLeft and paddingRight explicitly.
paddingLeft
paddingRight
The text was updated successfully, but these errors were encountered:
Closing as this util has been removed as of version 8.x
Sorry, something went wrong.
No branches or pull requests
The issue is in
src/scripts/lib/utils.js:calcWidthOfInput()
:The spec for
window.getComputedStyle()
stipulates that shorthand properties likepadding
should be empty in the return object.Firefox adheres to spec on this, so
inputStyle.padding
is always""
. This results in input padding not being accounted for in Firefox.Chrome departs from spec in favor of usability, so
inputStyle.padding
reflects the actual padding settings of the element.The solution is to change this to copy
paddingLeft
andpaddingRight
explicitly.The text was updated successfully, but these errors were encountered: