New issue
Advanced search Search tips

Issue 630980 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

MacViews: IME character insertion does not work correctly.

Project Member Reported by karandeepb@chromium.org, Jul 25 2016

Issue description

Version: 54.0.2800.0 
OS: Mac

What steps will reproduce the problem?
(1) Enable MacViews.
(2) Open a Views textfield. (e.g. Bookmark bubble).
(3) Press and Hold 'a' key
(4) From the IME candidate window, select one of the options and press Enter.

What is the expected output?
The selected character should get inserted.

What do you see instead?
The selected character from the popup still remains selected. On pressing the right arrow key, some garbage value appears.

This regressed in https://codereview.chromium.org/2033433006.

 
Note the redundant 'a' inserted is another bug -  http://crbug.com/624657 .
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f955be13bc49601dc963dcc7e2182ef792b600f9

commit f955be13bc49601dc963dcc7e2182ef792b600f9
Author: karandeepb <karandeepb@chromium.org>
Date: Thu Jul 28 11:50:44 2016

MacViews: Change insertTextInternal to correctly handle IME character input.

This CL fixes a regression caused in r400918 which modified the insertText
handlers to use the current key down event instead of the passed |text| argument
for character text insertion. While this works correctly for regular text, this
is not correct for text inserted using an IME. This is because when the current
composition text is confirmed, say by pressing the Return key, |keyDownEvent_|
will correspond to the return key press event. Hence [keyDownEvent_ characters]
will not contain the text to be inserted.

This CL corrects the insertTextInternal function to use |text| instead of
|keyDownEvent_| to generate the synthetic ui::KeyEvent for character insertion,
hence fixing the bug.

BUG= 630980 

Review-Url: https://codereview.chromium.org/2180873002
Cr-Commit-Position: refs/heads/master@{#408374}

[modify] https://crrev.com/f955be13bc49601dc963dcc7e2182ef792b600f9/ui/views/cocoa/bridged_content_view.mm
[modify] https://crrev.com/f955be13bc49601dc963dcc7e2182ef792b600f9/ui/views/cocoa/bridged_native_widget_unittest.mm

Status: Fixed (was: Assigned)

Sign in to add a comment