Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detecting if the user closes the WebDialog with the [x] button #7

Open
DanRathbun opened this issue Jul 5, 2018 · 0 comments
Open

Comments

@DanRathbun
Copy link

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 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.)

I finally gave up, and used a Ruby-side set_on_close block as explained in post 9 of the topic thread mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant