Skip to content
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

[WEB-] chore: trigger command k from input fields and editors #4362

Merged
merged 1 commit into from
May 8, 2024

Conversation

aaryan610
Copy link
Collaborator

Problem:

  1. Command K modal cannot be triggered from input fields, textarea and editors.

Solution:

  1. Moved Cmd + K shortcut logic out of the input field restriction condition. Now, Command K modal can be triggered from anywhere, but cannot be opened if any other modal is open.

Media:

Screen.Recording.2024-05-04.at.00.59.04.mov
Screen.Recording.2024-05-04.at.01.00.26.mov

Plane issue: WEB-

@aaryan610 aaryan610 marked this pull request as draft May 3, 2024 19:32
@aaryan610 aaryan610 changed the title [WEB-] chore: trigger command k even from inputs [WEB-] chore: trigger command k from input fields and editors May 4, 2024
@aaryan610 aaryan610 marked this pull request as ready for review May 7, 2024 18:40
@aaryan610 aaryan610 requested review from SatishGandham and removed request for sriramveeraghanta May 7, 2024 19:23

if (cmdClicked && keyPressed === "k" && !isAnyModalOpen) {
e.preventDefault();
toggleCommandPaletteModal(true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why does this toggleCommand take an input?

@SatishGandham SatishGandham merged commit cc4bb38 into preview May 8, 2024
11 of 12 checks passed
@SatishGandham SatishGandham deleted the chore/command-k branch May 8, 2024 08:10
@sriramveeraghanta sriramveeraghanta added this to the v0.20-dev milestone May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants