fix: keyboard regression after introducing Tags & Properties in page editor#1016
Merged
perber merged 2 commits intoMay 22, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
allowedHotkeysprop toFormInputand wire it todata-allow-hotkeysso the global hotkey handler can explicitly permit combos on focused inputs. - Thread
allowedHotkeys="Enter"through multiple dialog inputs (page dialogs + user/password dialogs), including throughSlugInputWithSuggestion. - 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.