Bug 28913 - Programmatic focus transfer from an iframe to input type="text" unusable
: Programmatic focus transfer from an iframe to input type="text" unusable
Status: NEW
: WebKit
WebKit Misc.
: 528+ (Nightly build)
: Macintosh Intel Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
: 28908
  Show dependency treegraph
 
Reported: 2009-09-02 11:13 PST by
Modified: 2013-03-21 13:59 PST (History)


Attachments
testcase for "partial" focus transfer (791 bytes, application/zip)
2009-09-02 11:13 PST, Alexander Pavlov (apavlov)
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-09-02 11:13:48 PST
Created an attachment (id=38933) [details]
testcase for "partial" focus transfer

When an input type="text" 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 "Click me to pop up" div to show the editbox with "partial" focus.
------- Comment #1 From 2009-09-04 13:50:41 PST -------
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's the use case for creating a text input from oncontextmenu?
------- Comment #2 From 2009-09-04 14:17:55 PST -------
(In reply to comment #1)
> This is an interesting bug, but for the purposes of prioritization, does it
> affect any existing site, or does it have such potential? What's the use case
> 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 "Blocks" field initially.
------- Comment #3 From 2013-03-21 13:59:24 PST -------
See also: bug 20387.