1
0
Fork 0
forked from 0x2620/oxjs

use .on, not .eventname

This commit is contained in:
rolux 2013-12-06 21:43:00 +01:00
commit 7c640519d1
8 changed files with 45 additions and 35 deletions

View file

@ -296,19 +296,21 @@ Ox.VideoAnnotationPanel = function(options, self) {
self.$editor = Ox.Element()
.addClass('OxVideoAnnotationPanel OxMedia')
.mousedown(function(e) {
var $target = $(e.target);
!$target.is('.OxPosition') && !$target.is('input') && that.gainFocus();
// the following is needed to determine
// how to handle annotation input blur
if (self.editing) {
self.focused = true;
setTimeout(function() {
// annotation folder will gain focus on blur
// so we need to get focus back
that.gainFocus();
self.focused = false;
}, 25);
.on({
mousedown: function(e) {
var $target = $(e.target);
!$target.is('.OxPosition') && !$target.is('input') && that.gainFocus();
// the following is needed to determine
// how to handle annotation input blur
if (self.editing) {
self.focused = true;
setTimeout(function() {
// annotation folder will gain focus on blur
// so we need to get focus back
that.gainFocus();
self.focused = false;
}, 25);
}
}
});