Skip to content

fix: Stop popup editor from swallowing space key on Chromium - #1651

Open
enzi221 wants to merge 1 commit into
kwaroran:mainfrom
enzi221:fix/popup-editor-space-key
Open

enzi221 wants to merge 1 commit into
kwaroran:mainfrom
enzi221:fix/popup-editor-space-key

Conversation

@enzi221

@enzi221 enzi221 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

PR Checklist

  • Required Checks
    • Have you added type definitions?
    • Have you tested your changes?
    • Have you checked that it won't break any existing features?
  • If your PR is highly AI generated[^2], check the following:
    • Have you understood what the code does?
    • Have you cleaned up any unnecessary or redundant code?
    • Is it not a huge change?
      • We currently do not accept highly AI generated PRs that are large changes.

Summary

Fix Chromium users can't insert spaces in the popup editor.

Related Issues

None.

Changes

It seems that the current version of Monaco does NOT add contenteditable but uses EditContext API. This results in space keys not working at all in the popup editor.

Since its default hot key is Ctrl X, this is massively painful.

This PR adds another guard that is return 'editContext' in el && el.editContext != null. Verified working in Chrome (supports the API) and Firefox (does not support the API).

Impact

Usable popup editor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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