Skip to content

fix: resolve page selection issue in the "Go to page" dropdown on desktop - #5678

Open
swarupasaroogumma wants to merge 1 commit into
asyncapi:masterfrom
swarupasaroogumma:fix/pagination-dropdown-selection
Open

fix: resolve page selection issue in the "Go to page" dropdown on desktop#5678
swarupasaroogumma wants to merge 1 commit into
asyncapi:masterfrom
swarupasaroogumma:fix/pagination-dropdown-selection

Conversation

@swarupasaroogumma

@swarupasaroogumma swarupasaroogumma commented Jul 31, 2026

Copy link
Copy Markdown

Problem

The shared Pagination component'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 onClick event was processed, requiring multiple clicks for page navigation.

Root Cause

The dropdown trigger relied on an onBlur handler 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

  • Removed the onBlur handler from the dropdown trigger.
  • Kept the existing dropdown closing logic inside the page button's onClick handler (setIsDropdownOpen(false)), allowing the selected page to be processed before closing the dropdown.

Testing

  • Verified page selection works with a single click on desktop Chrome.
  • Verified page selection works with a single click on Microsoft Edge.
  • Verified the dropdown closes after selecting a page.
  • Verified existing mobile behavior remains unchanged.

Before

TESTING_BEFORE

##After

Uploading testingafter.gif…

Summary by CodeRabbit

  • Bug Fixes
    • Improved pagination page selector behavior by preventing it from closing unexpectedly when focus changes.

@netlify

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8322fac
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6a6d02343bf01e0008d85cff
😎 Deploy Preview https://deploy-preview-5678--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f3435e4a-f81c-4a44-9171-b20f9698f6a3

📥 Commits

Reviewing files that changed from the base of the PR and between b9ccd73 and 8322fac.

📒 Files selected for processing (1)
  • components/Pagination.tsx
💤 Files with no reviewable changes (1)
  • components/Pagination.tsx

📝 Walkthrough

Walkthrough

The pagination dropdown no longer uses a delayed onBlur handler to close the page selector. Other pagination behavior is unchanged.

Changes

Cohort / File(s) Summary
Pagination selector
components/Pagination.tsx
Removes the dropdown button’s delayed onBlur handler.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the fix to desktop page selection in the "Go to page" dropdown.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@asyncapi-bot

Copy link
Copy Markdown
Contributor

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 70
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-5678--asyncapi-website.netlify.app/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Be Triaged

Development

Successfully merging this pull request may close these issues.

2 participants