From 26c15baa2b5d037d65acf5d2990337902e99e428 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Fri, 28 Aug 2020 17:42:58 +0200 Subject: [PATCH] =?UTF-8?q?:bug:=20r=C3=A9pare=20le=20comportement=20de=20?= =?UTF-8?q?l'autocompl=C3=A8te=20de=20commune=20au=20click?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/conversation/select/SelectCommune.tsx | 7 ++++++- publicodes/source/components/Overlay.tsx | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mon-entreprise/source/components/conversation/select/SelectCommune.tsx b/mon-entreprise/source/components/conversation/select/SelectCommune.tsx index 056449af7..0ee32fe56 100644 --- a/mon-entreprise/source/components/conversation/select/SelectCommune.tsx +++ b/mon-entreprise/source/components/conversation/select/SelectCommune.tsx @@ -150,8 +150,8 @@ export default function Select({ onChange, value }) { e.preventDefault() + } onClick={() => handleSubmit(result)} role="option" focused={i === focusedElem} + data-role="commune-option" key={nom} onFocus={() => setFocusedElem(i)} > diff --git a/publicodes/source/components/Overlay.tsx b/publicodes/source/components/Overlay.tsx index 0e8771cb4..f4b82a52b 100644 --- a/publicodes/source/components/Overlay.tsx +++ b/publicodes/source/components/Overlay.tsx @@ -7,6 +7,11 @@ type OverlayProps = React.HTMLAttributes & { xPosition?: number children: React.ReactNode } +declare global { + interface Window { + parentIFrame?: any + } +} const useIFrameOffset = () => { const [offsetTop, setOffset] = useState(null)