I have the following button in a UXP dialog:
<sp-button type="submit" id="buttonLIGHTSTPOK" variant="primary" style="position: relative; left: 20px;">OK</sp-button>
It’s part of a form:
<form method="dialog" id="formLIGHTSTPDIALOG" style="padding: 50px; width: 480px; height: 240px;">
The JS:
document.getElementById('formLIGHTSTPDIALOG').addEventListener('submit', function(evt){
console.log("here") //Should log "here" but it doesn't
evt.preventDefault(); //To keep form from closing with when "return" key hit
}
})
This used to properly log “here” when the “OK” button was clicked. Not anymore. The “OK” button does nothing now. The submit event seems to longer be captured.