You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried everything suggested on StackOverflow, but nothing worked. I used addEventListener, attachEvent, just plain window.onclose =, and even JQuery's $(window).on("close"....
I also tried the unload and the beforeunload events. Nothing was firing for me (in SU2016 specifically, although another member said it was firing in SU2014.)
No mention is made of detecting if the user closes the WebDialog with the [x] button.
I seem to remember a topic thread at SketchUcation on this, but a search does not find it easily.
So, I opened a thread in the new discourse forums ...
Detecting the exit button click in a browser dialog’s JavaScript
I tried everything suggested on StackOverflow, but nothing worked. I used
addEventListener
,attachEvent
, just plainwindow.onclose =
, and even JQuery's$(window).on("close"...
.I also tried the
unload
and thebeforeunload
events. Nothing was firing for me (in SU2016 specifically, although another member said it was firing in SU2014.)I finally gave up, and used a Ruby-side
set_on_close
block as explained in post 9 of the topic thread mentioned above.The text was updated successfully, but these errors were encountered: