Closed Bug 1802938 Opened 3 years ago Closed 2 years ago

beforeunload popup opens

Categories

(Core :: DOM: Events, defect, P3)

Firefox 108
defect

Tracking

()

RESOLVED INCOMPLETE
Tracking Status
firefox108 --- wontfix
firefox109 --- wontfix

People

(Reporter: infinita740, Unassigned)

References

()

Details

Attachments

(1 file)

Attached image Firefox popup.png

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0

Steps to reproduce:

  1. open this wikipedia image: https://commons.wikimedia.org/w/index.php?title=File:Firefox_logo,_2019.svg&lang=fr&uselang=fr
  2. Interract with the page (click in blank space)
  3. Try to close the tab

Actual results:

Firefox show 'beforeunload' popup.

This does not happen with firefox 107.0.

Also happens in nightly 109.0a1 and on other sites than French Wikipedia

Expected results:

Nothing/the tab closes without popup

I was able to reproduce this intermittently (1 time out of 25~) on both Firefox Beta 108 and Nightly 109.0a1 but unfortunately I have not found a sure way to reproduce it consistently.

@infinita740, does it occur consistently on your end? If yes, could you please try to run a mozregression in order to find out what caused this?
Here is where you can find it: https://mozilla.github.io/mozregression/

Thank you for reporting!

Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Events
Ever confirmed: true
Flags: needinfo?(infinita740)
Product: Firefox → Core

Hi, thank you for looking into it.

I used mozregression but could not find a patch responsible so i checked again my initial assumption.

I was wrong, it happens for me with earlier versions (but seemingly less frequently),
after more testing I foud it (maybe?) dependent on network/full loading of the page (the popup is more frequent if I close the tab quickly).

I still feel there is someting weird as these documentations (https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event , https://developer.mozilla.org/en-US/docs/Web/Security/User_activation) are saying that user input is needed (touch, keydown, mousedown/up) but in my testing simply scrolling the page was sufficient to trigger the popup.

You can close the bug as I am not able to reproduce it 100% of the time (if I let the page fully load).

Flags: needinfo?(infinita740)

I don't understand what the problem is. We show the popup because the website is asking us to. I'm not sure what else we should be doing instead?

(In reply to infinita740 from comment #2)

I still feel there is someting weird as these documentations (https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event , https://developer.mozilla.org/en-US/docs/Web/Security/User_activation) are saying that user input is needed (touch, keydown, mousedown/up) but in my testing simply scrolling the page was sufficient to trigger the popup.

How exactly are you scrolling the page? If you are using the scroll wheel or the keyboard, that will send mouse or key events to the page, which counts as user activation. If you're using the scrollbar, it shouldn't.

The severity field is not set for this bug.
:edgar, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(echen)
Summary: beforeunload popup frequently opens in firefox 108 → beforeunload popup opens
Severity: -- → S3
Priority: -- → P3
Flags: needinfo?(echen)

I think this is working as expected

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: