RESOLVED FIXED 169891
Prevent new navigations from onbeforeunload handler
https://bugs.webkit.org/show_bug.cgi?id=169891
Summary Prevent new navigations from onbeforeunload handler
Daniel Bates
Reported 2017-03-20 14:01:15 PDT
We should not allow navigation initiated from an onberforeunload handler.
Attachments
Patch and layout test (5.77 KB, patch)
2017-03-20 14:02 PDT, Daniel Bates
no flags
Patch and layout test (5.81 KB, patch)
2017-03-20 14:11 PDT, Daniel Bates
no flags
Radar WebKit Bug Importer
Comment 1 2017-03-20 14:01:57 PDT
Daniel Bates
Comment 2 2017-03-20 14:02:58 PDT
Created attachment 304947 [details] Patch and layout test
Simon Fraser (smfr)
Comment 3 2017-03-20 14:04:33 PDT
Comment on attachment 304947 [details] Patch and layout test View in context: https://bugs.webkit.org/attachment.cgi?id=304947&action=review > Source/WebCore/ChangeLog:3 > + onbeforeunload handler may start new navigation Would be nice to phrase this more actively: "onbeforeunload handler may start new navigation but should not be able to", or, better, "Prevent new navigations from onbeforeunload handler"
Daniel Bates
Comment 4 2017-03-20 14:04:36 PDT
Comment on attachment 304947 [details] Patch and layout test View in context: https://bugs.webkit.org/attachment.cgi?id=304947&action=review > LayoutTests/fast/events/before-unload-forbidden-navigation.html:15 > +var didFireOnBeforeLoad = false; Will rename to didFireOnbeforeunloadEvent before landing. I am open to suggestions.
Daniel Bates
Comment 5 2017-03-20 14:11:22 PDT
Created attachment 304948 [details] Patch and layout test Updated ChangeLog to reflect updated bug title. Also renamed the variable didFireOnBeforeLoad to didFireBeforeUnloadEvent in the included test.
Daniel Bates
Comment 6 2017-03-20 16:07:58 PDT
Comment on attachment 304948 [details] Patch and layout test Clearing flags on attachment: 304948 Committed r214194: <http://trac.webkit.org/changeset/214194>
Daniel Bates
Comment 7 2017-03-20 16:08:03 PDT
All reviewed patches have been landed. Closing bug.
Brent Fulgham
Comment 8 2017-05-22 10:49:35 PDT
*** Bug 169833 has been marked as a duplicate of this bug. ***
Lucas Forschler
Comment 9 2019-02-06 09:18:57 PST
Mass move bugs into the DOM component.
Note You need to log in before you can comment on or make changes to this bug.