0

Is it possible to change the default option (if the user just presses enter) for the window.onbeforeunload event? The popup button defaults to "leave this page" (at-least in Chrome), and I was wondering if there is a way, in the function, to change this default to "stay on page".

1
  • 3
    No, it's not possible to change the default option. Commented May 20, 2013 at 15:11

1 Answer 1

1

It is not possible to change the button selected by default in an exit dialog without making a change to the user's web browser itself.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.