pagehide event not raised when tab opened and closed in short time
Categories
(Core :: DOM: Events, defect)
Tracking
()
People
(Reporter: bugzilla, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0
Steps to reproduce:
- Open a tab on a site which registers a
pagehide
listener - Close tab with Ctrl-W
- Immediately reopen tab
Actual results:
The pagehide
event is not fired.
Expected results:
A pagehide
event should have been fired when the tab was closed
Reporter | ||
Comment 1•1 year ago
|
||
Some notes on reproducing this:
- I encountered the problem at
https://develop.element.io
. On that site, if thepagehide
handler is not called, then when the tab is reopened, you see "Element is open in another window". - I was unable to reproduce the problem with a minimal site. I don't know if this is because Element is doing something specific to trigger the problem, or if it's some sort of race which is hard to trigger with a lightweight site.
- To observe the issue, I found it helpful to set the config setting
devtools.console.stdout.content
totrue
, to getconsole.log
printed to stdout. Element logs when thepagehide
handler is called.
Comment 2•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Tabbed Browser' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•1 year ago
|
||
I've reproduced this issue in the latest versions Nightly 119.0a1 and Firefox 117.0.1 on Windows 10 x64 when using the second time the option "Reopen Closed Tab" thus:
- open https://develop.element.io in a new tab
- close tab
- use "Reopen Closed Tab" option
- repeat all steps
Setting the component and waiting for the developer's opinion about it.
If this is not the correct component, please feel free to change it to a more appropriate one.
Description
•