Skip to content

fix: sensor not working when element's width or height is 0 #203

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

Merged
merged 1 commit into from
Dec 22, 2017

Conversation

lxjwlt
Copy link
Contributor

@lxjwlt lxjwlt commented Dec 13, 2017

when element's width or height is 0, resizeSensor get 0 as well, so it cannot trigger scroll event properly.

set top and left to -10px, make sure the width and height of resizeSensor has 10px at least.

bug example: https://jsfiddle.net/lxjwlt/ko7ha6va/
after fixing: https://jsfiddle.net/lxjwlt/3hhownrp/

@marcj marcj merged commit fdb851e into marcj:master Dec 22, 2017
@marcj
Copy link
Owner

marcj commented Dec 22, 2017

Good fix, 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.

2 participants