loleaflet/src/control/Control.ContextMenu.js | 11 +++++++++++ 1 file changed, 11 insertions(+)
New commits: commit 92dfb147df0be2361a10f55c424bb5b70969522f Author: Tamás Zolnai <[email protected]> AuthorDate: Fri Nov 29 19:30:53 2019 +0100 Commit: Tamás Zolnai <[email protected]> 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 <[email protected]> Tested-by: Tamás Zolnai <[email protected]> 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(); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
