diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-04-25 20:27:23 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-04-25 17:27:50 +0200 |
commit | 0fda13ba3962c3a9175eaac311c49f7b4f64b7f1 (patch) | |
tree | 745ab746401e3d2362624b078b0214de5b8fe2b6 | |
parent | 30f7c767dacddb1ba09cada756948d4e0a0169ea (diff) |
loleaflet: Commit reply comment when focus lost2.1-rc3
Change-Id: I0a47c6b74afed31264aec06ab654063fb5beaca8
(cherry picked from commit 07607863925cf4fc2dbc91685d8f430f849c5535)
Reviewed-on: https://gerrit.libreoffice.org/36954
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r-- | loleaflet/src/layer/marker/Annotation.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index 30959f20e..87fd29e94 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -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); |