vinterliste/frontend
Ole-Morten Duesund a94a38071b fix(tags): tagging works on Android Chrome PWA
TagInput's onkeydown only commits on `e.key === 'Enter' || e.key === ','`.
On Android Chrome with predictive text (GBoard et al), the soft keyboard
keydown fires with `e.key === 'Unidentified'` and `e.keyCode === 229`
during IME composition — the check misses entirely, the Enter never
adds the tag, and the press instead bubbles up to the parent <form>
and submits the whole activity. Result: impossible to tag from mobile.

Fixes:

- Track composition state via oncompositionstart / oncompositionend
  so we ignore commits while the IME is mid-composition.
- Accept Enter via either `e.key === 'Enter'` OR `e.keyCode === 13`
  (and same for comma). preventDefault on every commit attempt so
  the parent form never submits accidentally.
- Add an explicit "Legg til"-button next to the input. Foolproof
  mobile path — a tap is a tap, no IME involved. Desktop users
  still have Enter.
- `enterkeyhint="done"` so the soft keyboard shows a sensible label
  on the action key. autocapitalize/autocorrect/spellcheck off so
  tags don't get mangled by autocomplete suggestions.

Placeholder copy updated to mention the button.
2026-05-25 22:19:55 +02:00
..
public Design refresh: warmer palette, softer cards, badge icons, hero treatment 2026-05-25 15:47:39 +02:00
src fix(tags): tagging works on Android Chrome PWA 2026-05-25 22:19:55 +02:00
index.html Design refresh: warmer palette, softer cards, badge icons, hero treatment 2026-05-25 15:47:39 +02:00
svelte.config.js Scaffold Vinterliste — end-to-end encrypted winter activity list 2026-05-25 12:27:14 +02:00
tsconfig.json Public landing, owner-list links, owner-conditional semi, PWA + mobile 2026-05-25 12:57:59 +02:00
vite.config.ts Scaffold Vinterliste — end-to-end encrypted winter activity list 2026-05-25 12:27:14 +02:00