summaryrefslogtreecommitdiff
path: root/loleaflet/src/map/Map.js
diff options
context:
space:
mode:
Diffstat (limited to 'loleaflet/src/map/Map.js')
-rw-r--r--loleaflet/src/map/Map.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 024192295..38f0803dc 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -1408,12 +1408,14 @@ L.Map = L.Evented.extend({
this._activeDialog = dialog;
this._isSearching = false;
- var doclayer = this._docLayer;
- if (doclayer)
+ if (this.editorHasFocus()) {
+ // The document has the focus.
+ var doclayer = this._docLayer;
doclayer._updateCursorAndOverlay();
-
- if (acceptInput !== undefined)
+ } else if (acceptInput !== undefined) {
+ // A dialog has the focus.
this.focus(acceptInput);
+ }
},
// Our browser tab lost focus.