fix-navbar-dropdown-bug#82
Conversation
👷 Deploy request for quickstpdf pending review.Visit the deploys page to approve it
|
|
@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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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
lockeduseState and all its setters across the four dropdown components inNavbar.jsx. - Simplified
onMouseEnter/onMouseLeavehandlers to only toggleisOpen. - 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.
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.