From c821817c382928d2683a24797fa4293427e624fa Mon Sep 17 00:00:00 2001 From: j Date: Mon, 10 Dec 2018 16:18:17 +0100 Subject: [PATCH] avoid double annotation on blur, fixes #3196 --- source/UI/js/Video/AnnotationFolder.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/UI/js/Video/AnnotationFolder.js b/source/UI/js/Video/AnnotationFolder.js index 73c26466..977575fe 100644 --- a/source/UI/js/Video/AnnotationFolder.js +++ b/source/UI/js/Video/AnnotationFolder.js @@ -327,6 +327,7 @@ Ox.AnnotationFolder = function(options, self) { blur: function(data) { if (data && data.id[0] == '_') { changeAnnotation(data); + that.triggerEvent('blur'); } else { // the video editor will, if it has not received focus, // call blurItem @@ -410,8 +411,10 @@ Ox.AnnotationFolder = function(options, self) { function changeAnnotation(data) { var item = Ox.getObjectById(self.options.items, data.id); - item.value = data.value; - that.triggerEvent('change', item); + if (item.value != data.value) { + item.value = data.value; + that.triggerEvent('change', item); + } } function crossesPoint() {