<?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>28913</bug_id>
          
          <creation_ts>2009-09-02 11:13:48 -0700</creation_ts>
          <short_desc>Programmatic focus transfer from an iframe to input type=&quot;text&quot; unusable</short_desc>
          <delta_ts>2013-03-21 13:59:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>28908</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Pavlov (apavlov)">apavlov</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>144250</commentid>
    <comment_count>0</comment_count>
      <attachid>38933</attachid>
    <who name="Alexander Pavlov (apavlov)">apavlov</who>
    <bug_when>2009-09-02 11:13:48 -0700</bug_when>
    <thetext>Created attachment 38933
testcase for &quot;partial&quot; focus transfer

When an input type=&quot;text&quot; is added to the top-level document from an iframe element oncontextmenu handler and the input element is given focus as input.focus(), only regular alphanumeric keypresses (onkeypress handler?) events reach the input element. Space/arrows are captured by the iframe, which can be seen as iframe content scrolling.

Attached is a reduced testcase that exposes the bug.
A context menu (Ctrl-click) should be invoked on the &quot;Click me to pop up&quot; div to show the editbox with &quot;partial&quot; focus.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>144913</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-09-04 13:50:41 -0700</bug_when>
    <thetext>Confirmed with r48070.

This is an interesting bug, but for the purposes of prioritization, does it affect any existing site, or does it have such potential? What&apos;s the use case for creating a text input from oncontextmenu?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>144925</commentid>
    <comment_count>2</comment_count>
    <who name="Alexander Pavlov (apavlov)">apavlov</who>
    <bug_when>2009-09-04 14:17:55 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; This is an interesting bug, but for the purposes of prioritization, does it
&gt; affect any existing site, or does it have such potential? What&apos;s the use case
&gt; for creating a text input from oncontextmenu?

I encountered it while implementing conditional breakpoints frontend (https://bugs.webkit.org/show_bug.cgi?id=28908) - a popup with the breakpoint condition editor is displayed instead of the context menu when a breakpoint is clicked in the source frame. The popup should be displayed in the top frame but I had to work this bug around and show it in the source iframe instead (which made the solution a bit heavier).
Sorry for not filling out the &quot;Blocks&quot; field initially.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>860655</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-03-21 13:59:24 -0700</bug_when>
    <thetext>See also: bug 20387.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>38933</attachid>
            <date>2009-09-02 11:13:48 -0700</date>
            <delta_ts>2009-09-02 11:13:48 -0700</delta_ts>
            <desc>testcase for &quot;partial&quot; focus transfer</desc>
            <filename>badfocus.zip</filename>
            <type>application/zip</type>
            <size>791</size>
            <attacher name="Alexander Pavlov (apavlov)">apavlov</attacher>
            
              <data encoding="base64">UEsDBBQAAAAIAB2wIjsUPflXNAAAAEMAAAAJABUAdGVzdC5odG1sVVQJAAPZsp5K27KeSlV4BAAX
d4gTs8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