Bug 127511

Summary: [GTK] Programmatic click does not work when javascript creates new window.
Product: WebKit Reporter: Niranjan Rao <nhrdls>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal    
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Test case none

Description Niranjan Rao 2014-01-23 14:01:00 PST
Created attachment 222027 [details]
Test case

Tested on Webkit gtk release 2.2.4 and 2.2.3. 

Open the attached sample html file in webkit view. Click on "Click me - does not work via web inspector" link to confirm link works. It opens a new window pointing to webkitgtk.org.

Open web inspector console and try following command and observe that nothing happens.

document.getElementById('a').click()

If you execute following in web inspector console, it should show you alert message.

document.getElementById('a').click()


This is the simplest test case I can reproduce. We use similar call to get element and call click method on it. javascript-can-open-windows-automatically is set to true on WebkitSettings.

Expect to see same behaviour when clicked physically by human or programmatically.
Comment 1 Niranjan Rao 2014-02-06 14:50:50 PST
Turns out this was security problem. I had to set java script can open windows flag.