New issue
Advanced search Search tips

Issue 858836 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

If custom scheme URL is opened before the window load event is received, the window load event is never dispatched.

Reported by hterezov@atlassian.com, Jun 28 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Steps to reproduce the problem:
1. Open the attached "test_window_load_not_dispatched.html" in Chromium
2. Check the DevTools Console. 
3. The console log is empty.

What is the expected behavior?
To see the console log for the window loaded event.

What went wrong?
The window loaded event was never dispatched.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 67.0.3396.99  Channel: stable
OS Version: OS X 10.13.5
Flash Version: Shockwave Flash 30.0 r0

I found the issue while I was trying to debug why the getUserMedia permission prompt is not displayed if I open a custom scheme URL. I traced the problem in Chromium source code to this line https://cs.chromium.org/chromium/src/chrome/browser/permissions/permission_request_manager.cc?type=cs&q=ScheduleShowBubble&sq=package:chromium&g=0&l=310 . 

I suppose this issue will also prevent any permission prompts to be displayed. I tried to open the custom scheme URL after the window load event is received and this fixes the issue.
 
test_window_load_not_dispatched.html
213 bytes View Download
Labels: Needs-Triage-M67
Cc: susan.boorgula@chromium.org
Labels: Triaged-ET M-69 FoundIn-69 Target-69
Status: Untriaged (was: Unconfirmed)
hterezov@ Thanks for the issue.

Able to reproduce this issue on Windows 10, Mac OS 10.13.3 and Ubuntu 14.04 on the reported version 67.0.3396.99 and the latest Canary 69.0.3475.0 as per the original comment.

On launching the given html file and opening Devtools -> Console, the console log is empty.
Attached is the screen cast for reference.

This is a Non-Regression issue as this behavior is observed from M-60 chrome builds.
Hence marking this as Untriaged for further updates from Dev.

Thanks..
858836-M60.mp4
287 KB View Download
Components: Blink>DOM Blink>Loader
Components: -Blink>DOM
Removing DOM component, this seems unconnected with DOM/HTML code.
Components: UI>Browser>Navigation
Labels: -Type-Bug -Pri-2 -OS-Mac Pri-3 Type-Task
Status: Available (was: Untriaged)
Confirmed.

If navigation to a custom scheme is triggered, onload event for the original document is cancelled, even if the navigation just opens an external application and does not unload the original document.

I quickly checked the navigation spec, but it looks browser should run unload algorithm anyway, and abort the active document. Probably the spec just does not assume this use case.

Current Chrome behavior is still running existing JavaScript code, e.g. setInterval continues to run, but just load event seems to be dropped.

Remove OS label, Add Navigation compoenent, change Pri to 3, and Type from Bug to Task.
Labels: External-Protocol-Handler
Labels: -External-Protocol-Handler Hotlist-External-Protocol-Handler

Sign in to add a comment