mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 01:28:55 +00:00
fix(quality): resolve reliability findings on dev
The Sonar quality gate rated new code D. Preserve focus and keyboard interaction through native controls and shared dialog behavior. Replace ambiguous regex scans with bounded parsing and make numeric coercion and initialization explicit.
This commit is contained in:
@@ -644,7 +644,7 @@ export default function PlaceFormModal(props: PlaceFormModalProps) {
|
||||
type="text"
|
||||
// A new place starts at the search; an edit or a place brought
|
||||
// in from the map already has what the search would give.
|
||||
autoFocus={!place && !prefillCoords}
|
||||
data-initial-focus={(!place && !prefillCoords) || undefined}
|
||||
value={mapsSearch}
|
||||
onChange={e => { setMapsSearch(e.target.value); S.setEmptySearch(null) }}
|
||||
onKeyDown={handleSearchKeyDown}
|
||||
|
||||
Reference in New Issue
Block a user