loleaflet/src/layer/marker/ClipboardContainer.js | 4 ++++ loleaflet/src/layer/tile/TileLayer.js | 2 +- loleaflet/src/map/handler/Map.Keyboard.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-)
New commits: commit ed531f70e80a288918f30232ca81d3f878c5f41b Author: Henry Castro <hcas...@collabora.com> AuthorDate: Wed Aug 22 15:53:05 2018 -0400 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Wed Sep 12 20:02:52 2018 +0200 loleaflet: encapsulate activeElement Change-Id: I21326c075c7a40b96ac946daaf70d488e0d633f9 Reviewed-on: https://gerrit.libreoffice.org/60382 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/loleaflet/src/layer/marker/ClipboardContainer.js b/loleaflet/src/layer/marker/ClipboardContainer.js index b6f80e871..90fbc8766 100644 --- a/loleaflet/src/layer/marker/ClipboardContainer.js +++ b/loleaflet/src/layer/marker/ClipboardContainer.js @@ -74,6 +74,10 @@ L.ClipboardContainer = L.Layer.extend({ this._textArea.setAttribute('spellcheck', 'false'); }, + activeElement: function () { + return this._textArea; + }, + _setPos: function (pos) { L.DomUtil.setPosition(this._container, pos); } diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 5cc13c1a2..0c564baa5 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1493,7 +1493,7 @@ L.TileLayer = L.GridLayer.extend({ // the state of the document (if the falgs are set) _updateCursorAndOverlay: function (update) { if (this._map._permission === 'edit' - && this._map._clipboardContainer._textArea === document.activeElement + && this._map._clipboardContainer.activeElement() === document.activeElement && this._isCursorVisible && this._isCursorOverlayVisible && !this._isEmptyRectangle(this._visibleCursor)) { diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index 7fc588c61..f5d3282da 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -251,7 +251,7 @@ L.Map.Keyboard = L.Handler.extend({ compEventFn = L.bind(docLayer._postCompositionEvent, docLayer, 0 /* winid */); } if (!inputEle) { - inputEle = this._map._clipboardContainer._textArea; + inputEle = this._map._clipboardContainer.activeElement(); } this.modifier = 0; var shift = e.originalEvent.shiftKey ? this.keyModifier.shift : 0; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits