• yosin's avatar
    Keyboard event should not insert a character at selection if selection doesn't have focus · c5138fa2
    yosin authored
    This patch makes Blink not to insert a character at selection if selection
    doesn't have focus to align with other browser's behavior.
    
    The test expectation of "keypress-focus-change.html" is changed for moving focus
    on "keydown" event handler. In Firefox, it still insert a character at selection
    but Blink and Edge don't. On manual focus moving, Firefox also doesn't insert
    character.
    
    To unblock CL[1] as soon as possible, this patch uses ugly test case. Following
    patch will fix it.
    
    [1] http://crrev.com/2616623002: Do not send redundant
    ViewHostMsg_TextInputStateChanged-message
    
    BUG=89026
    TEST=LayoutTests/editing/input/keyboard_event_without_focus.html
    
    Review-Url: https://codereview.chromium.org/2628763003
    Cr-Commit-Position: refs/heads/master@{#443189}
    c5138fa2
keypress-focus-change.html 1.3 KB