From 286d90464934b56c7cd86e0c3f3a04df20b1ac28 Mon Sep 17 00:00:00 2001 From: Alejandro Date: Sat, 7 Aug 2021 14:25:09 -0300 Subject: [PATCH 1/2] add focusAfterOpen popup prop --- src/components/UI/Popup.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/UI/Popup.js b/src/components/UI/Popup.js index 09c2478..28f9d7b 100644 --- a/src/components/UI/Popup.js +++ b/src/components/UI/Popup.js @@ -92,6 +92,11 @@ export default { showed: { type: Boolean, default: false + }, + + focusAfterOpen: { + type: Boolean, + default: true, } }, From ab0395c7413aac23bcb8b349edf5e355ec293660 Mon Sep 17 00:00:00 2001 From: Alejandro Date: Sat, 7 Aug 2021 14:29:21 -0300 Subject: [PATCH 2/2] Edit doc to add focusAfterOpen prop --- docs/api/popup.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/api/popup.md b/docs/api/popup.md index ea61402..a9f867b 100644 --- a/docs/api/popup.md +++ b/docs/api/popup.md @@ -49,6 +49,12 @@ - **Description:** If `true` content of the Popup treated as plain text - **See:** `setText` in [Popup](https://docs.mapbox.com/mapbox-gl-js/api/#popup#settext) +### `focusAfterOpen` + +- **Type**: `Boolean` +- **Description:** If `true` the popup will try to focus the first focusable element inside the popup +- **See:** `focusAfterOpen` in [Popup](https://docs.mapbox.com/mapbox-gl-js/api/#popup#focusafteropen) + ## Slots ### `default`