From f0d6b619e98a399dd667cbdb9000700046795e59 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Tue, 14 Jan 2020 06:46:17 -0500 Subject: [PATCH] leaflet: give focus to the dialog on open Change-Id: I715025123edf2bcf0564b5ce43c16b5595daed5b Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86754 Reviewed-by: Michael Meeks Tested-by: Michael Meeks --- loleaflet/src/control/Control.LokDialog.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 2abdc0246..a0e9ff9b8 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -1026,6 +1026,9 @@ L.Control.LokDialog = L.Control.extend({ if (parentId in that._dialogs) { // We might have closed the dialog by the time we render. that._dialogs[parentId].isPainting = false; + if (!that._isSidebar(parentId)) { + that.focus(parentId); + } } }; img.src = imgData;