fix(CopyPageButton): prevent position flash on page reload#2816
fix(CopyPageButton): prevent position flash on page reload#2816alexandratran merged 3 commits intoMetaMask:mainfrom
Conversation
|
@swastik7805 is attempting to deploy a commit to the Consensys Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 984abfd. Configure here.
|
Visibilty property addition on CopyButton css fixes the issue |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
e2fbb43 to
984abfd
Compare
|
The copy button is missing from the tutorials with this update. |
Hi @alexandratran ,thanks for pointing out that bug. Hi @yashovardhan @AyushBherwani1998 could u please take a moment and review my PR. Thanks |
|
Hc__ |

Description
Fix
CopyPageButtonflashing at the wrong position (top-left) for a split secondon page reload before moving to its correct position (top-right of H1).
The button was briefly visible in its default DOM position before
useEffectcouldmove it into the
.h1Wrapper. Fixed by hiding the button withvisibility:hiddenbydefault, and only showing it via
visibility:visiblewhen it's inside.h1Wrapper— ensuring it's never visible until it's already in the correct position.
Issue(s) fixed
Fixes #2811
Preview
CopyButtonFlash-preview.mp4
Checklist
External contributor checklist
@alexandratran please review the PR.
Note
Low Risk
Low risk CSS/markup tweak that only affects
CopyPageButtonvisibility and positioning; potential risk is the button staying hidden if wrapper/standalone styling isn’t applied as expected.Overview
Prevents
CopyPageButtonfrom briefly rendering in the wrong (default) position on page reload by making the containervisibility: hiddenby default.The button is now only made visible when rendered inside
.h1Wrapper, or when thestandaloneprop is set (via an added conditionalstyles.standaloneclass).Reviewed by Cursor Bugbot for commit e42c67c. Bugbot is set up for automated code reviews on this repo. Configure here.