-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TA#66892 [MIG][16.0] resize_observer_error_catcher
- Loading branch information
1 parent
01bea0e
commit 737d21c
Showing
8 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
============================= | ||
Resize Observer Error Catcher | ||
============================= | ||
|
||
This module prevent the raising of an error when resizing the window (by zoom in or zoom out). | ||
Here are the errors that the module skipped : | ||
- `ResizeObserver loop completed with undelivered notifications` | ||
- `ResizeObserver loop limit exceeded` | ||
|
||
.. image:: static/description/resize_observer_error.png | ||
|
||
Contributors | ||
------------ | ||
|
||
* Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
|
||
More information | ||
---------------- | ||
|
||
* Meet us at https://bit.ly/numigi-com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Resize Observer Error Catcher", | ||
"summary": "Skip Resize Observer interface error when zooming.", | ||
"version": "16.0.1.0.0", | ||
"website": "https://bit.ly/numigi-com", | ||
"author": "Numigi", | ||
"maintainer": "Numigi", | ||
"license": "AGPL-3", | ||
"depends": ["base_setup"], | ||
"data": [], | ||
"assets": { | ||
"web.assets_backend": [ | ||
"resize_observer_error_catcher/static/src/js/resize_observer_catcher.js", | ||
], | ||
}, | ||
"installable": True, | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+122 KB
resize_observer_error_catcher/static/description/resize_observer_error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions
16
resize_observer_error_catcher/static/src/js/resize_observer_catcher.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
odoo.define('resize_observer_error_catcher.handling_error', function (require) { | ||
"use strict"; | ||
|
||
window.addEventListener('error', (e) => { | ||
if ( | ||
[ | ||
'ResizeObserver loop completed with undelivered notifications.', | ||
'ResizeObserver loop limit exceeded', | ||
/* add more if needed */ | ||
].includes(e.message) | ||
) { | ||
e.stopImmediatePropagation(); | ||
} | ||
}); | ||
|
||
}); |