Skip to content

Entering the Typst-specific context meu (through Right-Click or Menu-Key) deselects editing window #673

@jdpieck

Description

@jdpieck

Summary

When the Typst-specific context menu (such as the one for spell correction) is opened in the web editor, the editor's text area loses focus. This means subsequent keyboard inputs are not registered in the editor until the window is re-selected. This issue specifically occurs when interacting with the spell-corrector.

Steps to Reproduce

  1. Open the Typst text IDE web editor.
  2. Type a word that Typst's spell-checker will mark as misspelled (e.g., "typoo").
  3. Right-click on the misspelled word (or place the cursor on it and press the Menu key) to bring up the Typst-specific context menu with spell correction suggestions.
  4. Observe the editor's focus.
  5. Attempt to type more text into the editor.

Expected Behavior

The Typst-specific context menu should appear, but the editing window should retain its focus. After dismissing the context menu (e.g., by clicking outside it or pressing Esc), the user should be able to continue typing directly into the editor without needing to re-click the text area.

Actual Behavior

Upon opening the Typst-specific context menu (e.g., for spell correction), the editing window loses its active focus. If the user attempts to type after dismissing this context menu without first clicking back into the editor, their input is not registered in the Typst editor.

Impact

This bug disrupts the workflow, forcing users to perform an extra click to regain focus after using the Typst-specific context menu, particularly when trying to correct spelling errors. This adds friction to a common editing task.

Additional Notes

This behavior is inconsistent with typical text editor interactions where the text input area usually retains focus even after temporary UI elements like context menus are displayed. The issue is observed specifically with the Typst-generated context menu, not general browser context menus.

Reproduction URL

No response

Browsers

Chrome

OS

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions