tdf#132125 leaflet: setting annotations active and inactive on focus
adding these classes help in pasting text in comments in calc and impress
Change-Id: Id94e6017d1db5f024f4ebfa287051c799c225ec9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98860
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js
index f60b7b6..b8d24a4 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -145,6 +145,7 @@ L.Annotation = L.Layer.extend({
},
focus: function () {
$(this._container).addClass('annotation-active');
this._nodeModifyText.focus();
this._nodeReplyText.focus();
},
@@ -313,6 +314,7 @@ L.Annotation = L.Layer.extend({
},
_onLostFocus: function (e) {
$(this._container).removeClass('annotation-active');
if (this._contentText.origText !== this._nodeModifyText.value) {
this._onSaveComment(e);
}