Bug 127511 - [GTK] Programmatic click does not work when javascript creates new window.
Summary: [GTK] Programmatic click does not work when javascript creates new window.
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-23 14:01 PST by Niranjan Rao
Modified: 2014-02-06 14:50 PST (History)
0 users

See Also:


Attachments
Test case (394 bytes, text/html)
2014-01-23 14:01 PST, Niranjan Rao
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.