fix: resolve page selection issue in the "Go to page" dropdown on desktop - #5678
fix: resolve page selection issue in the "Go to page" dropdown on desktop#5678swarupasaroogumma wants to merge 1 commit into
Conversation
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe pagination dropdown no longer uses a delayed Changes
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5678--asyncapi-website.netlify.app/ |



Problem
The shared
Paginationcomponent's "Go to page" dropdown did not correctly navigate to the selected page on desktop browsers.Selecting a page from the dropdown caused the trigger to lose focus before the page button's
onClickevent was processed, requiring multiple clicks for page navigation.Root Cause
The dropdown trigger relied on an
onBlurhandler to close the menu. On desktop browsers, the dropdown closed before the selected page button received its click event, preventing the page change from being processed.Solution
onBlurhandler from the dropdown trigger.onClickhandler (setIsDropdownOpen(false)), allowing the selected page to be processed before closing the dropdown.Testing
Before
##After
Summary by CodeRabbit