Hard to explain what I am seeing but will try to explain…
API2
Manifest 5
I have a button which opens a Modal Dialog using sp-dialog
Should code run whilst the Dialog is open ?
document.querySelector("#modal-customSize").setAttribute("open");
console.log("HERE"); <=== this executes when the modal is open