onbeforeunload handling on tab close broken - page is unloaded, no way to recover
mbirth last edited by Gwen-Dragon
Many pages where you enter data set a "onbeforeunload" handler so when you accidentally try to close the tab or navigate away, you will get a warning and a chance to stay on the page without losing all your input.
However, when I close a tab with such handler in Vivaldi, the tab turns blank and THEN I'm asked if I want to "Stay" or "Leave". Clicking "Stay" doesn't do anything but presents the same question again and again. It doesn't recover my tab. Only "Leave" works and closes the tab completely.
To test, go to: https://www.wikitechy.com/step-by-step-html-tutorials/attributes/tryit/onbeforeunload-attribute-in-html and then close that tab.
This is with Vivaldi 1.14.1072.3 (Official Build) snapshot (64-bit) on Ubuntu 17.10.
Is a bug.
VB-3984 "window.onbeforeunload event is firing but non-void return value is not prompting for confirm page..."
Fixed now in 1.15.1104.3 Snapshot.
Confirmation popup shows.