mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Extend the use of ResizeObserver by dropping all knockoutjs observable this.resizerTrigger in mail composer
As benefit this also drops the CustomEvent('resize.real')
This commit is contained in:
parent
35c9f3fff5
commit
d1c06a8ece
10 changed files with 48 additions and 117 deletions
|
|
@ -14,3 +14,19 @@ Array.prototype.flat || Object.defineProperty(Array.prototype, 'flat', {
|
|||
},
|
||||
writable: true
|
||||
});
|
||||
|
||||
if (!window.ResizeObserver) {
|
||||
window.ResizeObserver = class {
|
||||
constructor(callback) {
|
||||
this.observer = new MutationObserver(callback.debounce(250));
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
this.observer.disconnect();
|
||||
}
|
||||
|
||||
observe(target) {
|
||||
this.observer.observe(target, { attributes: true, subtree: true, attributeFilter: ['style'] });
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue