jsdialog: focus map if last dialog closed

when we close last jsdialog then move focus into
map to avoid focusing document.body what causes
that user cannot type or move focus to the next button in
the UI

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0f9d38ecbac476c769dd66b820deb373e3cc224e
This commit is contained in:
Szymon Kłos 2023-08-29 11:53:53 +02:00 committed by Szymon Kłos
parent faa0477332
commit f5cbf9236c

View file

@ -522,6 +522,8 @@ L.Control.JSDialog = L.Control.extend({
var initialFocusElement = JSDialog.GetFocusableElements(container);
if (initialFocusElement && initialFocusElement.length)
initialFocusElement[0].focus();
} else {
this.map.focus();
}
}
else {