summaryrefslogtreecommitdiff
path: root/loleaflet
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2020-01-01 20:49:33 +0100
committerMarco Cecchetti <marco.cecchetti@collabora.com>2020-01-06 09:59:05 +0100
commit0f8402bd5a3c2e9e4f52c4d15842a1b175e8eee3 (patch)
treefdbaa60ff1b0d05760fe188eac18634cc0aea232 /loleaflet
parent48d234be962c0aec564414b2e00069f54416671b (diff)
loleaflet: reverse insertion when entering text in formula bar
This patch fixes the following issue: - Open a spreadsheet. - Enter a few chars in a cell, and press enter. - Go back to the cell, and in the formula bar, enter more text. => Characters are inserted backwards. Change-Id: I6930fab44c6cacdd4710d363ca3bf15d564b64e4 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86100 Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com> Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Diffstat (limited to 'loleaflet')
-rw-r--r--loleaflet/src/control/Control.LokDialog.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 2e1e52d90..d4040aadc 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -879,9 +879,10 @@ L.Control.LokDialog = L.Control.extend({
}
$('#sidebar-dock-wrapper').css({display: ''});
- this._map.fire('editorgotfocus');
- this._map.focus();
-
+ if (this._map.getWinId() === 0) {
+ this._map.fire('editorgotfocus');
+ this._map.focus();
+ }
},
_onCalcInputBarClose: function(dialogId) {
@@ -1073,8 +1074,10 @@ L.Control.LokDialog = L.Control.extend({
this._adjustCalcInputBar(deckOffset);
// If we didn't have the focus, don't steal it form the editor.
if ($('#' + this._currentDeck.strId + '-cursor').css('display') === 'none') {
- this._map.fire('editorgotfocus');
- this._map.focus();
+ if (this._map.getWinId() === 0) {
+ this._map.fire('editorgotfocus');
+ this._map.focus();
+ }
}
},