a5993b2091f26993ec9319b133ab0f9c9806b33d
Code-review fixes to the location-override panel. parseFloat is a prefix parser, so '48abc', '48,85' (comma-decimal paste) and '35.0116S' (hemisphere suffix, silently flipped to the wrong side of the equator) all passed the isFinite + range check, cleared the mismatch flag and were POSTed verbatim — the same silent-corruption class this feature exists to end. Replaced with a whole-value decimal check, and the valid branch now normalises to the 6dp the GPS handler and onDragEnd already write, so the pin and the submitted value cannot disagree. The submit gate keyed on the .location-field--mismatch class, which was only ever set by syncFields() on blur / debounced input / toggle-open-success / GPS — never at init. Three paths therefore reached the server unflagged: a draft restored by initDraft() (which runs before initLocationDetails() and assigns .value directly, firing no events), an edit-mode async prefill, and an open panel whose maplibre chunk failed to load. syncFields() now runs once at the end of initLocationDetails(), in the toggle handler's catch arm, and after the edit prefill writes lat/lng. Blanking both fields left the marker behind, presenting a stale coordinate as if it were still the entry's — added clearPin() to the map handle and call it. Removed hasPin(), which had no caller. Corrected two comments that named the wrong stylesheet and claimed .field-invalid reuse the code does not do. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
No description provided
370 MiB
Languages
JavaScript
80.5%
CSS
12.2%
SCSS
3.2%
Twig
2.6%
PHP
1.5%