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:
parent
faa0477332
commit
f5cbf9236c
1 changed files with 2 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue