summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2020-03-24 17:14:31 -0400
committerAndras Timar <andras.timar@collabora.com>2020-03-26 17:57:27 +0100
commit769d4c7e1f742bc9d39516b1f5fd979468ba56cd (patch)
tree9306772b8d6e667d45ff2e40669d79f97eb464ce
parentb22c49c555e99f20c377164265b215f57dabbedf (diff)
leaflet: give editor focus when closing sidebar
And remove ineffective focus on closing sidebar. Change-Id: Iac6d46c91ca70949c73cd8cdb29416ecb80be409 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91017 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91129
-rw-r--r--loleaflet/src/control/Control.LokDialog.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index a58766c21..67387016a 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -1162,7 +1162,7 @@ L.Control.LokDialog = L.Control.extend({
}
$('#sidebar-dock-wrapper').css({display: ''});
- if (this._map.editorHasFocus()) {
+ if (!this._map.editorHasFocus()) {
this._map.fire('editorgotfocus');
this._map.focus();
}
@@ -1218,7 +1218,6 @@ L.Control.LokDialog = L.Control.extend({
this._onSidebarClose(dialogId);
}
}
- $('#sidebar-dock-wrapper').css({display: ''});
},
_onEditorGotFocus: function() {