[Libreoffice-commits] online.git: Branch 'libreoffice-5-4' - loleaflet/src
Aron Budea
aron.budea at collabora.com
Wed Jan 31 16:38:09 UTC 2018
loleaflet/src/layer/marker/Annotation.js | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 0803f34aeeac1491a49952adb45a1d45cb11cf55
Author: Aron Budea <aron.budea at collabora.com>
Date: Wed Aug 9 02:35:45 2017 +0200
loleaflet: don't add reply on Cancel, don't leave empty box
Reply was added when clicking Cancel. This is a regression from
07607863925cf4fc2dbc91685d8f430f849c5535
Additionally, when focus was lost on an empty, initial commit,
an empty, defunct comment box remained until reload.
Change-Id: I49a5224ff70de65623496cfcba538acb6a8086f8
Reviewed-on: https://gerrit.libreoffice.org/40915
Reviewed-by: pranavk <pranavk at collabora.co.uk>
Tested-by: pranavk <pranavk at collabora.co.uk>
(cherry picked from commit a75b780b8aa05d3cf5b8ede6f9075ca06a9d5d28)
Reviewed-on: https://gerrit.libreoffice.org/49003
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js
index 8226335c..2932053a 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -216,6 +216,7 @@ L.Annotation = L.Layer.extend({
_onCancelClick: function (e) {
L.DomEvent.stopPropagation(e);
this._nodeModifyText.value = this._contentText.origText;
+ this._nodeReplyText.value = '';
this.show();
this._map.fire('AnnotationCancel', {annotation: this});
},
@@ -232,6 +233,10 @@ L.Annotation = L.Layer.extend({
if (this._contentText.origText !== this._nodeModifyText.value) {
this._onSaveComment(e);
}
+ else if (this._nodeModifyText.value == '') {
+ // Implies that this._contentText.origText == ''
+ this._onCancelClick(e);
+ }
},
_onLostFocusReply: function(e) {
More information about the Libreoffice-commits
mailing list