<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>127511</bug_id>
          
          <creation_ts>2014-01-23 14:01:00 -0800</creation_ts>
          <short_desc>[GTK] Programmatic click does not work when javascript creates new window.</short_desc>
          <delta_ts>2014-02-06 14:50:50 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Niranjan Rao">nhrdls</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>971333</commentid>
    <comment_count>0</comment_count>
      <attachid>222027</attachid>
    <who name="Niranjan Rao">nhrdls</who>
    <bug_when>2014-01-23 14:01:00 -0800</bug_when>
    <thetext>Created attachment 222027
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 &quot;Click me - does not work via web inspector&quot; 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(&apos;a&apos;).click()

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

document.getElementById(&apos;a&apos;).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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>977547</commentid>
    <comment_count>1</comment_count>
    <who name="Niranjan Rao">nhrdls</who>
    <bug_when>2014-02-06 14:50:50 -0800</bug_when>
    <thetext>Turns out this was security problem. I had to set java script can open windows flag.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>222027</attachid>
            <date>2014-01-23 14:01:00 -0800</date>
            <delta_ts>2014-01-23 14:01:00 -0800</delta_ts>
            <desc>Test case</desc>
            <filename>r.html</filename>
            <type>text/html</type>
            <size>394</size>
            <attacher name="Niranjan Rao">nhrdls</attacher>
            
              <data encoding="base64">PGh0bWw+CiAgPGhlYWQ+CiAgICA8c2NyaXB0PgogICAgICBmdW5jdGlvbiBvcGVuTWUoKSB7CiAg
ICAgIHdpbmRvdy5vcGVuKCdodHRwOi8vd2Via2l0Z3RrLm9yZy8nLCBudWxsKTsKICAgICAgfQog
ICAgPC9zY3JpcHQ+CiAgICA8Ym9keT4KICAgICAgPGRpdj4KICAgICAgICA8YSBpZD0iYSIgaHJl
Zj0iamF2YXNjcmlwdDpvcGVuTWUoKTsiPkNsaWNrIG1lIC0gZG9lcyBub3Qgd29yayB2aWEgd2Vi
IGluc3BlY3RvcjwvYT4KCSAgPC9kaXY+Cjxici8+Cjxici8+CiAgICAgIDxkaXY+CiAgICAgICAg
PGEgaWQ9ImIiIGhyZWY9ImphdmFzY3JpcHQ6YWxlcnQoJ0hlbGxvIHdvcmxkIScpOyI+U2ltcGxl
IGZ1bmN0aW9uLCB3b3JrczwvYT4KCSAgPC9kaXY+CgogICAgPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>