fix(geocoding): tap targets for Navigate (peek state) + close dropdown on Navigate here (#177)#178
Conversation
…n on Navigate here Two related taps were silently swallowed. 1. Geocode-bar Navigate button missing from peek pointer-events opt-in. The bar in peek state has pointer-events: none and only handle/copy/close/addr were explicitly opted back in. On mobile Safari the implicit child-receives-events behaviour for a pointer-events: none parent is unreliable, so .geocode-bar__nav silently dropped taps. Add it to the opt-in list. Without Navigate firing, hideGeocodeBar() from #176 never ran, so the bar stayed visible and the guidance pill's Stop button was still under the bar's drag handle. 2. Search dropdown's Navigate here handler started guidance without closing the dropdown. The dropdown sits at z-index 2000 above the guidance pill and on smaller viewports can overlap its action area; also a UX nit (stale chrome). Add hideDropdown() to the click handler. Closes #177 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code ReviewOverall: Clean, minimal fix that correctly diagnoses two related bugs. The root-cause analysis in the PR description is excellent — the cascade (Navigate tap swallowed →
|
Per PR #178 review nit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code ReviewOverall: Clean, surgical fix for two related mobile tap-event bugs. The change is small, well-scoped, and the PR description does excellent work explaining the causal chain between them. What the PR does
Code Quality
Correctness
Minor observations (non-blocking)
Test CoverageUnit tests (633) pass. The two behaviors fixed here are pointer-event and z-index interactions that can only be verified manually on a touch device — no actionable gap in the automated suite. Verdict: LGTM. Both fixes are correct, well-explained, and consistent with project conventions. |
Summary
Two silently-swallowed taps that combine to make both Navigate and Stop appear broken on mobile.
1. Geocode-bar Navigate missing from peek opt-in (long-press flow)
```css
.geocode-bar--peek { pointer-events: none; }
.geocode-bar--peek .geocode-bar__handle,
.geocode-bar--peek .geocode-bar__copy,
.geocode-bar--peek .geocode-bar__close,
.geocode-bar--peek .geocode-bar__addr { pointer-events: auto; }
```
`.geocode-bar__nav` is missing from this list. The CSS spec says descendants of `pointer-events: none` still receive events, but mobile Safari has long-standing quirks here — the existing opt-in for the other interactive children was already a workaround for this. Add Navigate to it.
This also explains why the Stop fix from #176 didn't help: `hideGeocodeBar()` is called from Navigate's click handler. If Navigate never fires, the bar never hides, and the bar's drag handle keeps eating Stop taps.
2. Search dropdown stays open after Navigate here
The `.sheet-result__nav-btn` handler at `geocoding.ts:246` calls `startGuidance()` without closing the dropdown. `.search-dropdown` is `z-index: 2000` (above the guidance pill at Leaflet's default ~800), and on small viewports can overlap the pill. Add `hideDropdown()` before guidance starts.
Closes #177.
Test plan
🤖 Generated with Claude Code