Created attachment 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.
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?
(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.
See also: bug 20387.