mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update emby input
This commit is contained in:
parent
21fbbc894a
commit
ae55e83e30
1 changed files with 26 additions and 0 deletions
|
@ -53,6 +53,32 @@
|
|||
this.addEventListener('keyup', onChange);
|
||||
|
||||
onChange.call(this);
|
||||
|
||||
if (window.IntersectionObserver) {
|
||||
var observer = new IntersectionObserver(function (entries) {
|
||||
for (var j = 0, length2 = entries.length; j < length2; j++) {
|
||||
var entry = entries[j];
|
||||
var intersectionRatio = entry.intersectionRatio;
|
||||
if (intersectionRatio) {
|
||||
|
||||
var target = entry.target;
|
||||
onChange.call(target);
|
||||
}
|
||||
}
|
||||
}, {});
|
||||
|
||||
observer.observe(this);
|
||||
this.observer = observer;
|
||||
}
|
||||
};
|
||||
|
||||
EmbyInputPrototype.detachedCallback = function () {
|
||||
|
||||
var observer = this.observer;
|
||||
if (observer) {
|
||||
observer.disconnect();
|
||||
this.observer = null;
|
||||
}
|
||||
};
|
||||
|
||||
document.registerElement('emby-input', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue