fix(properties): stop the property row eating the space bar - #1895
Merged
Conversation
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
h4yfans
force-pushed
the
property-name-space-input
branch
from
August 30, 2026 16:09
7cc3029 to
dfc670b
Compare
Typing `movie series` into a property field lands `movieseries`. Four cases: the add-property name field, a text property's value, a new select option's name, and renaming a property. Two of them fail today. Real key events throughout — `fill()` and stubbed editors both pass while every keystroke is being swallowed, which is why the existing PropertyRow.test.tsx never saw this.
A property row's value slot is a `role="button"` div that starts editing on
Enter or Space, and it called `preventDefault()` for those keys on every
keydown it saw. React routes synthetic events up the component tree, so the
text/number/url/long-text inputs under it — and, through the Radix portal,
the select, status and multiselect option-name and search inputs — all fed
their keydowns through that handler. Every space typed into a property was
cancelled before the browser could insert it, which is the reported
`movie series` becoming `movieseries`.
Activate only on the wrapper's own keystrokes. A keydown that started in a
descendant belongs to that descendant.
The same shape sits unguarded on the folder-view grid
(folder-table-view.tsx, grouped-table.tsx); those are still safe because
every editable cell shields itself with `onKeyDown={stopPropagation}`.
h4yfans
force-pushed
the
property-name-space-input
branch
from
August 30, 2026 18:13
dfc670b to
7e4df49
Compare
h4yfans
marked this pull request as ready for review
August 30, 2026 18:37
Closed
10 tasks
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.
Summary
Typing
movie seriesinto a property field producedmovieseries. Reported by a customer onv2026-08-25 as "Properties do not allow spaces anymore".
Root cause:
apps/desktop/src/renderer/src/components/note/info-section/PropertyRow.tsx:514.A property row's value slot is a
role="button"div that starts editing on Enter or Space, and itcalled
preventDefault()for those keys on every keydown it saw:React routes synthetic events up the component tree, so every editor rendered under
PropertyValueRendererfed its keydowns through that handler. The space was cancelled before thebrowser could insert it. This reaches further than it looks: the select, status and multiselect
pickers render into a Radix portal, whose DOM node sits on
document.bodybut whose React parent isstill this div, so their option-name and search inputs were hit too.
Affected inputs, all under that one wrapper: text, number, URL and long-text property values,
plus the option-name and search fields of select, status, multiselect, relation and project
properties.
The fix is one line — activate only on the wrapper's own keystrokes. A keydown that started in a
descendant belongs to that descendant.
Not affected
Two nearby fields were checked and are fine, and the E2E covers both so they stay that way:
AddPropertyPopup.tsx) is not under this wrapper. This is thefield the bug was first attributed to; it always accepted spaces.
PropertyRow.tsx:465) is a sibling of the value slot, not a child.Same shape elsewhere, left alone
folder-table-view.tsx:998andgrouped-table.tsx:980do the same unguardedcase ' ': preventDefault()on a
role="grid"container. They are safe today only because every editable cell shields itself withonKeyDown={stopPropagation}(folder-view/property-cell.tsx:406,440). Not touched here — no evidenceof a live bug, and widening the diff into a second surface is not what this fix needs.
Release note
Fixed: you can type spaces in note property values again, and in select, status and multiselect
option names.
Test plan
New E2E
apps/desktop/tests/e2e/property-space-input.e2e.ts, driving real key events(
keyboard.type, neverfill()—fill()sets the value directly and passes even while everykeystroke is being swallowed). Committed before the fix so the history shows it failing.
Before the fix:
After:
New renderer test
PropertyRow.space-input.test.tsxrenders the real editors — the existingPropertyRow.test.tsxstubs them all out, which is why it never saw this. Covers the direct childinput, the portalled select option name, and that a genuine Space on the wrapper still opens the
editor. 2 failed / 1 passed before, 3 passed after.
Gates, all green:
pnpm lint— 0 errors, 109 pre-existing warningspnpm typecheck— exit 0pnpm --filter @memry/desktop test:renderer— 700 files, 8527 passedpnpm test:e2e -- property-space-input.e2e.ts— 4 passedpnpm check:architecture— passedgit diff --check— cleandocs:impactflaggedmissing-docsand was waived withMEMRY_DOCS_IMPACT_SKIP=1. This restoresbehaviour the docs already assume —
apps/docs/src/user-guide/notes/properties-tags.mddescribessetting property values inline and never suggested spaces were special. Documenting "spaces work" would
only describe the bug.