mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°5888 - Add robustness when a modal is closed as resize observer is still here
This commit is contained in:
@@ -300,7 +300,9 @@ CombodoModal._InstantiateModal = function(oModalElem, oOptions) {
|
||||
|
||||
if(window.ResizeObserver) {
|
||||
const oModalObs = new ResizeObserver(function(){
|
||||
oModalElem.dialog("option", "position", {my: "center", at: "center", of: window});
|
||||
if(oModalElem.dialog('instance') !== undefined){
|
||||
oModalElem.dialog("option", "position", {my: "center", at: "center", of: window});
|
||||
}
|
||||
});
|
||||
oModalObs.observe(oModalElem[0]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user