[Libreoffice-commits] online.git: loleaflet/src
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Sun Dec 1 15:33:48 UTC 2019
loleaflet/src/control/Control.ContextMenu.js | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 92dfb147df0be2361a10f55c424bb5b70969522f
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Nov 29 19:30:53 2019 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sun Dec 1 16:33:31 2019 +0100
SpellingPopup: Remove selection by closing the context menu.
Change-Id: I99c87375f19225aead1b2f94806cadd1d27abe89
Reviewed-on: https://gerrit.libreoffice.org/84157
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js
index a5bf98ad9..3283a0039 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -102,6 +102,14 @@ L.Control.ContextMenu = L.Control.extend({
this._onClosePopup();
}
var contextMenu = this._createContextMenuStructure(obj);
+ var spellingContextMenu = false;
+ for (var menuItem in contextMenu) {
+ if (menuItem.includes('.uno:SpellCheckIgnore')) {
+ spellingContextMenu = true;
+ break;
+ }
+ }
+
L.installContextMenu({
selector: '.leaflet-layer',
className: 'loleaflet-font',
@@ -115,6 +123,9 @@ L.Control.ContextMenu = L.Control.extend({
map._docLayer.hideAnnotationFromCurrentCell();
} else if (!map._clip.filterExecCopyPaste(key)) {
map.sendUnoCommand(key);
+ // For spelling context menu we need to remove selection
+ if (spellingContextMenu)
+ map._docLayer._clearSelections();
// Give the stolen focus back to map
map.focus();
}
More information about the Libreoffice-commits
mailing list