From 31124a604a01666aa998371f8bf83734df2310d8 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 28 Mar 2026 23:11:47 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20auto-split=20pasted=20lat,lng=20coordin?= =?UTF-8?q?ates=20in=20place=20form=20=E2=80=94=20closes=20#22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Planner/PlaceFormModal.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/src/components/Planner/PlaceFormModal.tsx b/client/src/components/Planner/PlaceFormModal.tsx index 6f48961..ef4ec5f 100644 --- a/client/src/components/Planner/PlaceFormModal.tsx +++ b/client/src/components/Planner/PlaceFormModal.tsx @@ -281,6 +281,15 @@ export default function PlaceFormModal({ step="any" value={form.lat} onChange={e => handleChange('lat', e.target.value)} + onPaste={e => { + const text = e.clipboardData.getData('text').trim() + const match = text.match(/^(-?\d+\.?\d*)\s*[,;\s]\s*(-?\d+\.?\d*)$/) + if (match) { + e.preventDefault() + handleChange('lat', match[1]) + handleChange('lng', match[2]) + } + }} placeholder={t('places.formLat')} className="form-input" />