1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update events

This commit is contained in:
Luke Pulverenti 2016-08-07 15:43:52 -04:00
parent 08c6ef7935
commit 0e0fa54547
17 changed files with 140 additions and 141 deletions

View file

@ -1,4 +1,4 @@
define(['layoutManager', 'browser', 'css!./emby-input', 'registerElement'], function (layoutManager, browser) {
define(['layoutManager', 'browser', 'dom', 'css!./emby-input', 'registerElement'], function (layoutManager, browser, dom) {
var EmbyInputPrototype = Object.create(HTMLInputElement.prototype);
@ -67,20 +67,31 @@
}
}
this.addEventListener('focus', function () {
dom.addEventListener(this, 'focus', function () {
onChange.call(this);
label.classList.add('inputLabelFocused');
label.classList.remove('inputLabelUnfocused');
}, {
passive: true
});
this.addEventListener('blur', function () {
dom.addEventListener(this, 'blur', function () {
onChange.call(this);
label.classList.remove('inputLabelFocused');
label.classList.add('inputLabelUnfocused');
}, {
passive: true
});
this.addEventListener('change', onChange);
this.addEventListener('input', onChange);
this.addEventListener('valueset', onChange);
dom.addEventListener(this, 'change', onChange, {
passive: true
});
dom.addEventListener(this, 'input', onChange, {
passive: true
});
dom.addEventListener(this, 'valueset', onChange, {
passive: true
});
onChange.call(this);