Skip to content

fix-navbar-dropdown-bug#82

Open
adityakhati-03 wants to merge 1 commit into
JhaSourav07:mainfrom
adityakhati-03:fix-navBar-dropdown-bug
Open

fix-navbar-dropdown-bug#82
adityakhati-03 wants to merge 1 commit into
JhaSourav07:mainfrom
adityakhati-03:fix-navBar-dropdown-bug

Conversation

@adityakhati-03
Copy link
Copy Markdown

Issue : #79

Fix: Resolve stuck dropdown menu issue on click in Navbar

Description: This PR fixes a UI bug in the navigation bar where dropdown menus (Edit, Convert, Optimize, Security) would get "stuck" in an open state after being clicked, even if the user moved their cursor away. The intended behavior was for the dropdowns to behave consistently with the hover state.

Changes Made:

Removed the locked state variable and its associated logic from all 4 dropdown components (EditDropdown, ConvertDropdown, OptimizeDropdown, and SecurityDropdown) in src/components/layout/Navbar.jsx.
Simplified the onMouseEnter and onMouseLeave event handlers to exclusively control the isOpen state, ensuring the menus fold naturally when the cursor moves away, regardless of click events.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

👷 Deploy request for quickstpdf pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 3645516

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 18, 2026

@adityakhati-03 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quick-pdf Ready Ready Preview, Comment May 18, 2026 6:13pm

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes issue #79 where navbar dropdown menus (Edit, Convert, Optimize, Security) remained "stuck" open after being clicked. The fix removes the locked state that was preventing the onMouseLeave handler from closing the dropdown, so the menus now consistently close when the cursor leaves.

Changes:

  • Removed the locked useState and all its setters across the four dropdown components in Navbar.jsx.
  • Simplified onMouseEnter/onMouseLeave handlers to only toggle isOpen.
  • Incidental whitespace removal in package-lock.json.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
src/components/layout/Navbar.jsx Removes locked state from EditDropdown, ConvertDropdown, OptimizeDropdown, and SecurityDropdown so hover-based close works after a click.
package-lock.json Removes a few stray blank lines between package entries; no functional change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants