Skip to content

fix(engine): every field acts on Enter once an input method is done; Nothing found shows Google - #89

Merged
KennethWKZ merged 2 commits into
mainfrom
fix/enter-key-input-methods
Nov 24, 2026
Merged

KennethWKZ merged 2 commits into
mainfrom
fix/enter-key-input-methods

Conversation

@KennethWKZ

Copy link
Copy Markdown
Owner

A retro on the two map search bugs from a live trip (#87: the keyboard staying up after Search, and a Google result's pin drawn as a squeezed sliver), plus a third the planner found while testing the fix: with nothing found, the "Search Google" row sat behind the bottom bar after the keyboard closed. Each lesson, its evidence, and the test that now gates it:

Lesson Evidence Gate
An input method's Enter picks characters. Every Enter goes through enterKey (not isComposing, not Safari's keyCode 229). The page search (#q), the welcome name and the planner code read key === 'Enter' alone: a half-typed Chinese name was saved, a search jumped. tests/repo/engine-fields.test.mjs refuses a bare Enter check; keyboard.spec and sync.spec send a composing Enter (red before the fix on android-390 and webkit-390).
A field outside a form gets nothing from Enter. Every text, search and password field acts on Enter and lets go of it, so the phone's keyboard goes down. The add sheet's place search and the Group sync name had no handler, the gap the map search had in #87. engine-fields.test (every field has enterkeyhint); keyboard.spec and sync.spec press Enter (red before).
The page comes back lower once the keyboard goes. stageAfterKeyboard lines the map up again once the viewport stops resizing; a short list fits the sheet's half height whole. A phone screenshot: "Nothing found", its Google row behind 今天 / 日程 / 地图 / 更多. map-search.spec "nothing found…": moves the page down as the phone did, presses Search, checks the row clears the bottom bar (red before: 38 px under on android-390, 113 px on webkit-390).
A class names one component. A map pin's classes stay lpin, lpin-*, sel, dest. The result pin took the toilet list's .spot (#87). engine-fields.test (fails on the old spot, checked).
A visual state gets one assertion on how it's drawn; measure a spring with toPass. The pin's test checked class and name while it drew wrong; a sheet measured mid-spring failed by a third of a pixel. testing.md rules.
Playwright has no on-screen keyboard. Focus loss is testable; the keyboard going down is not. knowledge/engine-browser.md; a real iPhone check after merge.

Nothing about the real trip left trips/.

Ran locally

  • pnpm verify (190 passed, 0 failed) and pnpm test:release.
  • keyboard, sync, map-search, place-finder, add-stop and navigation specs on android-390 and webkit-390 (148 passed, 2 skipped).
  • map-search, place-finder and keyboard on all four projects after the sheet fix (108 passed, 4 skipped); the new sheet test 3 of 3 on repeat.

Still to try on a phone

Search on the map with nothing found: the keyboard goes down and the "Search Google" row shows whole above the bottom bar.

…Nothing found shows Google

Lessons from the map search bugs on a live trip (the keyboard staying up, the
result pin drawn as a sliver), sorted into fixes, rules and tests:

- An input method's Enter picks characters. The page search (#q), the
  welcome name and the planner code read key === 'Enter' alone, so a
  half-typed Chinese name was saved and a search jumped. Every Enter now goes
  through enterKey (02-helpers.js): not isComposing, not Safari's keyCode 229.
- A field outside a form gets nothing from Enter. The add sheet's place search
  and the Group sync name had no handler, the same gap the map search had: the
  keyboard stayed up. 22-events now acts on Enter for every text, search and
  password field and lets go of it (a name's change saves it as it does).
- The page comes back lower once the keyboard goes. The map was lined up under
  the header once, while typing; after the keyboard closed, the sheet's foot
  and its "Search Google" row sat behind the bottom bar. stageAfterKeyboard
  (16-map.js) waits for the viewport to stop resizing, then lines the map up
  again; the sheet's half height fits a short list whole.
- A class names one component: a map pin's classes stay lpin, lpin-*, sel and
  dest (the result pin had taken the toilet list's .spot).

Tests: tests/repo/engine-fields.test.mjs (every typing field has
enterkeyhint; no bare Enter check; pin classes); keyboard.spec (page search
and add sheet: composing Enter left alone, Enter lets go); sync.spec (the
welcome name and the Group sync name); map-search.spec (Nothing found after
the keyboard: the Google row clear of the bottom bar, red before the fix).
Docs: knowledge/engine-browser.md, frontend.md and testing.md patterns,
trip-page.md.
…t picked meanwhile

stageAfterKeyboard set the sheet back to its height about 450 ms after the
map search let go of its field. Moving focus to the sheet's down chevron is
such a let-go: the chevron lowered the sheet to its peek, and the re-fit
raised it again (map-search.spec "the sheet's heights answer to its
buttons", android-390 on CI). It now refits only the height the sheet had
when the field let go, and leaves a drag or a chevron alone; it no longer
raises a peek to half.
@KennethWKZ
KennethWKZ merged commit db46cc5 into main Nov 24, 2026
12 checks passed
@KennethWKZ
KennethWKZ deleted the fix/enter-key-input-methods branch November 24, 2026 22:29
@github-actions github-actions Bot mentioned this pull request Nov 24, 2026
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