Skip to content
Snippets Groups Projects
Commit 0fda13ba authored by Pranav Kant's avatar Pranav Kant Committed by Jan Holesovsky
Browse files

loleaflet: Commit reply comment when focus lost

Change-Id: I0a47c6b74afed31264aec06ab654063fb5beaca8
(cherry picked from commit 07607863)
Reviewed-on: https://gerrit.libreoffice.org/36954


Reviewed-by: default avatarJan Holesovsky <kendy@collabora.com>
Tested-by: default avatarJan Holesovsky <kendy@collabora.com>
parent 30f7c767
No related branches found
Tags 2.1-rc3
No related merge requests found
......@@ -191,6 +191,7 @@ L.Annotation = L.Layer.extend({
buttons = L.DomUtil.create(tagDiv, empty, this._nodeModify);
L.DomEvent.on(this._nodeModifyText, 'blur', this._onLostFocus, this);
L.DomEvent.on(this._nodeReplyText, 'blur', this._onLostFocusReply, this);
this._createButton(buttons, _('Save'), this._onSaveComment);
this._createButton(buttons, cancel, this._onCancelClick);
buttons = L.DomUtil.create(tagDiv, empty, this._nodeReply);
......@@ -230,6 +231,12 @@ L.Annotation = L.Layer.extend({
}
},
_onLostFocusReply: function(e) {
if (this._nodeReplyText.value !== '') {
this._onReplyClick(e);
}
},
_onMouseClick: function (e) {
var target = e.target || e.srcElement;
L.DomEvent.stopPropagation(e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment