web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

Don't mess with parent window scrollbars

Open dkent600 opened this issue 5 years ago • 6 comments

Currently when the modal popup appears, the dApps' scrollbars disappear. The space gained by hiding the scrollbar(s) causes all the dApp's content to shift around. This is messy UX.

Would be cleaner if the popup did not mess with parent window scrollbars.

dkent600 avatar Aug 13 '19 14:08 dkent600

Can you pinpoint a necessary CSS change that could fix this?

Can you also show an example where this happens?

Happy to look for a fix.

miohtama avatar Mar 29 '20 19:03 miohtama

Thanks @miohtama!

Examples, from https://alchemy.daostack.io/:

Before modal pops up, see scrollbar:

image

With modal popped up, no scroll bar:

image

Everything on the page moves when the scrollbar disappears and reappears. I guess I would play with the styling of the background that appears under the modal.

dkent600 avatar Mar 30 '20 11:03 dkent600

Is this fixed already?

pedrouid avatar May 04 '20 16:05 pedrouid

No, is not fixed.

dkent600 avatar May 04 '20 19:05 dkent600

Alright, I will get it on next release

pedrouid avatar May 04 '20 20:05 pedrouid

@pedrouid @miohtama @dkent600 any news on this? the layout shift is unfortunate:/ thanks for the info

microHoffman avatar May 09 '22 15:05 microHoffman

With stable version 2.0.0 of Web3Modal now released, we are officially dropping support for version 1.x Due to this this issue/pr was marked for closing. It is highly recommended to upgrade as 2.x will be receiving further updates that will enable functionality for some of our newer sdks like auth and push as well as support for WalletConnect v2 (See this post about WalletConnect v1 being deprecated https://medium.com/walletconnect/walletconnect-v1-0-sunset-notice-and-migration-schedule-8af9d3720d2e)

If you need to continue using Web3Modal 1.x and require this feature/fix implemented, we suggest adding it via forking V1 branch.

xzilja avatar Jan 21 '23 14:01 xzilja

I met the same question and make body not scroll but root div scoll it can solve

Antony-Jia avatar Jun 09 '23 03:06 Antony-Jia