loleaflet/src/layer/tile/TileLayer.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit d8dacec1e1e22df3595b72ae96dcb1b26674d296 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Thu Jul 16 15:51:06 2020 -0400 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Wed Sep 2 08:10:54 2020 +0200 loleaflet: no scroll if editing a cell formula Change-Id: I2b1bca30c795043c7172dd080e51cfe37c0dc008 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98931 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Henry Castro <hcas...@collabora.com> (cherry picked from commit f6667cfea18fb3aa6bc8a5769da5994a7e06e322) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101817 Reviewed-by: Aron Budea <aron.bu...@collabora.com> diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 726a5a5b2..eb030a2e6 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -781,6 +781,10 @@ L.TileLayer = L.GridLayer.extend({ } }, + _isEditFormula: function () { + return this._lastFormula && this._map._isCursorVisible; + }, + _onCellAddressMsg: function (textMsg) { // When the user moves the focus to a different cell, a 'cellformula' // message is received from lowsd, *then* a 'celladdress' message. @@ -2235,7 +2239,8 @@ L.TileLayer = L.GridLayer.extend({ center.y = Math.round(center.y < 0 ? 0 : center.y); if (!(this._selectionHandles.start && this._selectionHandles.start.isDragged) && !(this._selectionHandles.end && this._selectionHandles.end.isDragged) && - !(docLayer._followEditor || docLayer._followUser)) { + !(docLayer._followEditor || docLayer._followUser) && + !this._isEditFormula()) { this._map.fire('scrollto', {x: center.x, y: center.y, calledFromInvalidateCursorMsg: scroll !== undefined}); } } @@ -2929,7 +2934,8 @@ L.TileLayer = L.GridLayer.extend({ this._map.dialog._updateTextSelection(inputBarId); } var mapBounds = this._map.getBounds(); - if (!mapBounds.contains(this._cellCursor) && !this._cellCursorXY.equals(this._prevCellCursorXY)) { + if (!mapBounds.contains(this._cellCursor) && !this._cellCursorXY.equals(this._prevCellCursorXY) && + !this._isEditFormula()) { var scrollX = 0, scrollY = 0; if (onPgUpDn) { var mapHalfHeight = (mapBounds.getNorth() - mapBounds.getSouth()) / 2; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits