Closed Bug 1875028 Opened 1 year ago Closed 1 year ago

With Fission enabled "onbeforeunload" prompts are automatically accepted for cross-origin navigations

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

VERIFIED FIXED
126 Branch
Tracking Status
firefox126 --- verified

People

(Reporter: whimboo, Assigned: peterv)

Details

Attachments

(1 file)

On web pages that have setup a "beforeunload" handler a navigation as initiated by entering the URL into the location bar will automatically accept the prompt and continues with the navigation to the expected target web page.

Steps to reproduce:

  1. Start Firefox
  2. Open https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event#examples
  3. Scroll a bit down and enter some text into the input field of the playground example
  4. Focus the location bar and navigate to example.org

As it can be seen the beforeunload prompt is shown for a split of a second. Then it's automatically accepted and the navigation continues not leaving the user the chance to select Stay on page.

Note that when using the back and forward buttons from the toolbar the dialog is correctly shown. Also with Fission turned off this behavior cannot be seen.

Flags: needinfo?(smaug)
Component: DOM: Content Processes → DOM: Navigation
Flags: needinfo?(smaug)
Severity: -- → S2
Assignee: nobody → peterv
Status: NEW → ASSIGNED

Hi Peter. I wanted to ask if you have an update for this bug. Thanks.

Flags: needinfo?(peterv)
Flags: needinfo?(peterv)
Pushed by pvanderbeken@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/12f463440a22 With Fission enabled "onbeforeunload" prompts are automatically accepted for cross-origin navigations. r=farre
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch

Thanks! It works fine now.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: