Skip to content

Conversation

@abheeee03
Copy link

@abheeee03 abheeee03 commented Dec 2, 2025

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. Ensure your PR title includes a conventional commit label (such as feat, fix, or chore, among others). See existing PR titles for inspiration.

If applicable

  • My work is based on designs, which are linked or shown either in the Jira ticket or the description below.
  • My work includes tests or is validated by existing tests.
  • I have updated the esm-framework mock to reflect any API changes I have made.

Summary

This PR fixes an issue where the tab navbar would immediately reopen after being closed via the hamburger button.

Changes

  • Added e.stopPropagation() to onMouseDown and onTouchStart events on the HeaderMenuButton (hamburger icon).

Reasoning
The hamburger button click was propagating to a global "click outside" listener (likely useOnClickOutside or similar), causing a race condition where the menu would toggle state twice (close -> open) or interfere with the intended toggle action. Stopping propagation ensures the button click is handled in isolation.

Screenshots

before:

issue-hamburger.mp4

after:

fix-hamburger.mp4

Related Issue

https://openmrs.atlassian.net/browse/O3-5247

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.

1 participant