Skip to content

fix: disable shortcuts storybook - #582

Merged
lornakelly merged 1 commit into
open-workflow-specification:mainfrom
lornakelly:235/focus-bug
Dec 2, 2026
Merged

lornakelly merged 1 commit into
open-workflow-specification:mainfrom
lornakelly:235/focus-bug

Conversation

@lornakelly

@lornakelly lornakelly commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Sometimes when typing in text or dual editor the cursor would lose focus and you would have to click back, this was due to storybooks shortcuts hijacking the cursor

See second time I type, I type - h1: but no colon appeared and it lost focus

Screen.Recording.2026-12-02.at.11.57.03.mov

Fix is to disable the shortcuts

Signed-off-by: lornakelly <lornakelly88@gmail.com>
Copilot AI balanced review requested due to automatic review settings December 2, 2026 11:58
@changeset-bot

changeset-bot Bot commented Dec 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 919093d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify

netlify Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for openworkflow-editor ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 919093d
🔍 Latest deploy log https://app.netlify.com/projects/openworkflow-editor/deploys/6b1007e36262e3438d6b463e
😎 Deploy Preview https://deploy-preview-582--openworkflow-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the change disabling Storybook shortcuts in both editor demos.

No open issues 🎉

What changed in this PR

Disables Storybook keyboard shortcuts in both editor demos to prevent shortcuts from stealing focus while typing in Monaco.

Changes:

  • Adds manager configuration with enableShortcuts: false for both editors.
  • Documents why Monaco’s EditContext input triggers Storybook shortcuts.
File Description
packages/​text-editor/​.storybook/​manager.ts Disables shortcuts in the text editor’s Storybook.
packages/​dual-editor/​.storybook/​manager.ts Disables shortcuts in the dual editor’s Storybook.

Review effort: Balanced

@handreyrc handreyrc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@fantonangeli fantonangeli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Interestiing I wasn't able to reproduce the 1 keyboard shortcut issue on Firefox, but I can replicate this on Chrome.
And for example there was the same issue with m used for the measure tool in Storybook toolbar.
Great solution to disable the shortcuts

@lornakelly
lornakelly merged commit 5a84dd5 into open-workflow-specification:main Dec 2, 2026
13 checks passed
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.

4 participants