From ccc50be7dec56575e97265d9fccc95a0112cacca Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 2 Mar 2013 08:07:02 +0000 Subject: [PATCH] only focus if elment is in dom --- source/Ox.UI/js/Video/VideoEditor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Video/VideoEditor.js b/source/Ox.UI/js/Video/VideoEditor.js index 13141c3e..dacc02d1 100644 --- a/source/Ox.UI/js/Video/VideoEditor.js +++ b/source/Ox.UI/js/Video/VideoEditor.js @@ -44,7 +44,6 @@ Ox.VideoEditor VideoEditor Object // fixme: should be VideoAnnotationEditor Ox.VideoEditor = function(options, self) { - self = self || {}; var that = Ox.Element({}, self) .defaults({ @@ -1137,7 +1136,8 @@ Ox.VideoEditor = function(options, self) { if (Ox.isUndefined(data)) { // doubleclick on small timeline data = getAnnotation(); - } else if (!data.id) { + } else if (!data.id && Ox.UI.elements[that.oxid]) { + // focus only if in the dom that.gainFocus(); } // FIXME