Bug 34620 - Changing display type of parent of input on focus causes input field to not receive key events
Summary: Changing display type of parent of input on focus causes input field to not r...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://www.facebook.com/
Keywords: InRadar
Depends on:
Reported: 2010-02-04 15:17 PST by Simon Fraser (smfr)
Modified: 2010-02-05 11:50 PST (History)
1 user (show)

See Also:

Reduction (572 bytes, text/html)
2010-02-04 15:17 PST, Simon Fraser (smfr)
no flags Details
Patch (4.96 KB, patch)
2010-02-04 18:38 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (8.88 KB, patch)
2010-02-04 20:29 PST, Simon Fraser (smfr)
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2010-02-04 15:17:26 PST
Created attachment 48174 [details]

See attached testcase; if the focus handler on a text field changes the text field's parent display to inline-block, then the text field loses the ability to receive key events (but it retains focus).

This affects the Facebook signup page.
Comment 1 Simon Fraser (smfr) 2010-02-04 15:17:46 PST
Comment 2 Simon Fraser (smfr) 2010-02-04 16:32:28 PST
The problem here is that VisibleSelection.start() keeps pointing to the old m_innerText of the RenderTextControlSingleLine, even after a new one gets created during layout.
Comment 3 Simon Fraser (smfr) 2010-02-04 18:38:22 PST
Created attachment 48190 [details]
Comment 4 Simon Fraser (smfr) 2010-02-04 20:08:47 PST
Comment on attachment 48190 [details]

Mitz points out that Element::attach() goes to some length to avoid calling updateFocusAppearance() directly.
Comment 5 Simon Fraser (smfr) 2010-02-04 20:29:50 PST
Created attachment 48196 [details]
Comment 6 Simon Fraser (smfr) 2010-02-05 11:50:47 PST