WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
214124
WebKit should allow beforeunload alerts from web pages with active Media Capture session regardless of interaction state
https://bugs.webkit.org/show_bug.cgi?id=214124
Summary
WebKit should allow beforeunload alerts from web pages with active Media Capt...
Teodor
Reported
2020-07-08 22:40:48 PDT
Re:
bug 169936
I believe the heuristic needs to include an active Media Capture session. When the user entrusts the site with "permanent" access to the microphone and/or camera, the site no longer requires an interaction before it can launch a Media Capture session (e.g., WebRTC call). Under the current definition of activity a click or a keypress is required, which consequently means that if the person is participating in a WebRTC call, they can accidentally leave an active call by pressing F5 key, or closing the wrong tab, for example. Furthermore, the presence of onbeforeunload prompt will be inconsistent between sessions (the first time, user might see it because they have muted their audio prior to accidentally closing the tab, then the second time they would not see the prompt, as they haven't interacted with the page, leading them to believe that the site is at fault for not showing the prompt). If the check for an active Media Capture session doesn't seem sufficient, session duration check may also be added. For example, a minimum session duration of 10 seconds may be used. This would allow users to quickly close the tab if they see content that they don't expect to see, while still preventing accidental reloads that may lead to loss of data. An example of such data loss is a file transfer via RTC Data Channel, when a reload would reset the download progress, potentially leading to irrecoverable loss of data, if for example the transfer was initiated by sender pasting a screenshot from the clipboard. This proposal is cross-posted on Chromium and Firefox bug trackers.
Attachments
Add attachment
proposed patch, testcase, etc.
Teodor
Comment 1
2020-07-10 04:28:22 PDT
This discussion on other bug trackers Chromium:
https://bugs.chromium.org/p/chromium/issues/detail?id=1104149
Firefox:
https://bugzilla.mozilla.org/show_bug.cgi?id=1651962
Radar WebKit Bug Importer
Comment 2
2020-07-10 13:07:07 PDT
<
rdar://problem/65359087
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug