-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command Menu Fails to Close on First 'Escape' Click; Requires Second Click for Closure #1032
Comments
Thank you for opening your first issue and for being a part of the open signing revolution! |
Looks like this is due to two command windows opening instead of the one which is weird. Happy to have you work on it! |
@Mythie, I accidentally unassigned this task from myself. |
## Description Currently, when the command menu is opened using the Command+K hotkey, two modals are getting rendered. This is because the modals are mounted in two components: header and desktop-nav. Upon triggering the hotkey, both modals are rendered. ## Related Issue #1032 ## Changes Made The changes I made are in the desktop nav component. If the desktop nav receives the command menu state value and the state setter function, it will trigger only that. If not, it will trigger the state setter that is defined in the desktop nav. This way, we are preventing the modal from mounting two times. ## Testing Performed - Tested behaviour of command menu in the portal - Tested on browsers chrome, arc, safari, chrome, firefox ## Checklist - [x] I have tested these changes locally and they work as expected. - [ ] I have added/updated tests that prove the effectiveness of these changes. - [ ] I have updated the documentation to reflect these changes, if applicable. - [x] I have followed the project's coding style guidelines. - [ ] I have addressed the code review feedback from the previous submission, if applicable. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced the navigation experience by integrating command menu state management directly within the `DesktopNav` component, allowing for smoother interactions and control. - **Refactor** - Simplified the handling of the command menu by removing the `CommandMenu` component and managing its functionality within `DesktopNav`. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: David Nguyen <davidngu28@gmail.com>
Issue Description And Repro steps
Open the Command menu with ⌘+K.
When clicking "Escape" for the first time.
![Screenshot 2024-03-17 at 8 04 18 PM](https://private-user-images.githubusercontent.com/54791570/313481328-69805381-d750-4183-b9b4-7eb08b95e005.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1MjcyMDAsIm5iZiI6MTcyMDUyNjkwMCwicGF0aCI6Ii81NDc5MTU3MC8zMTM0ODEzMjgtNjk4MDUzODEtZDc1MC00MTgzLWI5YjQtN2ViMDhiOTVlMDA1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA5VDEyMDgyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVhMzRhYjc3ZjI1M2E1MjMyNTYzMjhkNTdjOGQwYjNlYTRlZWMzNmRiOTg3NmQxYmM3MzA5M2I5M2Y2YmNmODImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.pPHYWS7kdgv5OQ2S3hxIy9YznxbwLr_lMKvCEGz1Mpw)
Clicking "Escape" a second time closes the command menu.
Expected Behavior
The command menu should close upon the first press of the "Escape" key.
Operating System [e.g., Windows 10]
MAC OS 17.1
Browser [e.g., Chrome, Firefox]
Arc (Chromium based browser)
Version [e.g., 2.0.1]
1.33.0
Please check the boxes that apply to this issue report.
The text was updated successfully, but these errors were encountered: