-
Notifications
You must be signed in to change notification settings - Fork 541
[core - v2.2.9] : Update - Device driven background scroll control #992
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
[core - v2.2.9] : Update - Device driven background scroll control #992
Conversation
|
@Adamj1232 we also need to remove the scroll listener when the modal component is destroyed to prevent memory leaks. |
|
Yep totally agree, was refactoring that last night. I would be interested in your's and @taylorjdawson opinions on targeting the HTML tag for controlling background positioning (mobile: |
|
@Adamj1232 what's the goal of this PR exactly? |
|
@Adamj1232 If I understand correctly you're saying to attach the modal as a child of the |
|
The goal is to control the background positioning while the Onboard modal is open - I updated the description to reflect more thoroughly |
|
Another option to consider: disable scroll: enable scroll: I believe we could use |
|
I was really hoping to find a fix like you have that works across browsers but wasn't able to find anything reliable. |
…hirdweb-dev#992) * Refactor scroll handling to be device specific * Refactor for cleanliness * replace removeEventHandler and refactor * Revert demo change * Merge in new develop branch as base
Description
A follow on the this PR and response to this issue
The goal here is to:
To accomplish this and avoid as many possible side affects as possible I when with targeting the HTML tag for controlling background positioning (mobile: position, desktop: overflow)
The reason for the different approaches is:
overflow = 'hidden' on mobile allows for a small amount of scrolling causing a gap at the bottom of the view port where the backdrop shadow doesn't cover
position = 'fixed' on desktop causes the page to jump to the top of the view port when the modal is opened
Checklist
package.jsonis incremented following semantic versioning