diff --git a/browser/src/control/Control.JSDialog.js b/browser/src/control/Control.JSDialog.js index 5747fa771cef..8458d438dac2 100644 --- a/browser/src/control/Control.JSDialog.js +++ b/browser/src/control/Control.JSDialog.js @@ -145,7 +145,10 @@ L.Control.JSDialog = L.Control.extend({ console.warn('closePopover: no builder'); } else { + // Need to change focus to last element before we clear the current dialog + this.focusToLastElement(id); this.clearDialog(id); + return; } this.focusToLastElement(id);