Skip to content

fix: keyboard regression after introducing Tags & Properties in page editor#1016

Merged
perber merged 2 commits into
mainfrom
fix/keyboard-regression-after-introduce-tags-and-properties
May 22, 2026
Merged

fix: keyboard regression after introducing Tags & Properties in page editor#1016
perber merged 2 commits into
mainfrom
fix/keyboard-regression-after-introduce-tags-and-properties

Conversation

@perber
Copy link
Copy Markdown
Owner

@perber perber commented May 22, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 22, 2026 12:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restores dialog keyboard behavior by allowing the global dialog Enter hotkey to fire even when focus is inside text inputs (regressed after the Tags/Properties work introduced stricter hotkey guarding).

Changes:

  • Add an allowedHotkeys prop to FormInput and wire it to data-allow-hotkeys so the global hotkey handler can explicitly permit combos on focused inputs.
  • Thread allowedHotkeys="Enter" through multiple dialog inputs (page dialogs + user/password dialogs), including through SlugInputWithSuggestion.
  • Add an e2e regression test that creates a page by pressing Enter from the “Title” input, plus a page-object helper to press Enter.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui/leafwiki-ui/src/features/users/UserFormDialog.tsx Allow Enter hotkey while focused in user form inputs.
ui/leafwiki-ui/src/features/users/ChangePasswordDialog.tsx Allow Enter hotkey while focused in change-password inputs.
ui/leafwiki-ui/src/features/users/ChangeOwnPasswordDialog.tsx Allow Enter hotkey while focused in change-own-password inputs.
ui/leafwiki-ui/src/features/page/SlugInputWithSuggestion.tsx Propagate allowedHotkeys to the underlying FormInput.
ui/leafwiki-ui/src/features/page/EditPageMetadataDialog.tsx Allow Enter hotkey while focused in metadata dialog inputs.
ui/leafwiki-ui/src/features/page/CreatePageByPathDialog.tsx Allow Enter hotkey while focused in create-by-path inputs.
ui/leafwiki-ui/src/features/page/CopyPageDialog.tsx Allow Enter hotkey while focused in copy dialog inputs.
ui/leafwiki-ui/src/features/page/AddPageDialog.tsx Allow Enter hotkey while focused in add-page title/slug inputs.
ui/leafwiki-ui/src/components/FormInput.tsx Add allowedHotkeys prop and emit data-allow-hotkeys attribute.
e2e/tests/page.spec.ts Add regression test for creating a page via Enter from title input.
e2e/pages/AddPageDialog.ts Add helper to press Enter in the title input when submitting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread e2e/pages/AddPageDialog.ts
Comment thread e2e/tests/page.spec.ts
@perber perber merged commit 38e3851 into main May 22, 2026
6 checks passed
@perber perber deleted the fix/keyboard-regression-after-introduce-tags-and-properties branch May 22, 2026 13:00
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.

2 participants