-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Remove overflow hidden, use width instead VC-983 #343
Remove overflow hidden, use width instead VC-983 #343
Conversation
note for github. this should fix #269 |
element.parentElement.style.overflowX = 'hidden' | ||
if (element) { | ||
const currentStyleWidth = element.style.width; | ||
const realWidth = element.getBoundingClientRect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's worth define realWidth
variable already with the width
property? That would make more sense.
Otherwise looks strange on the next line realWidth.width
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
if (element) { | ||
const currentStyleWidth = element.style.width; | ||
const realWidth = element.getBoundingClientRect(); | ||
element.style.width = (realWidth.width - 1) + 'px'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth adding an explanatory comment why we subtract 1 from the realWidth
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Firefox horizontal scroll fix for left and right animations
there is already comment above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments in the code.
No description provided.