New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 796691 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Calling InputMethodController::CommitText() with empty text fires beforeinput and textInput events, but not input

Project Member Reported by rlanday@chromium.org, Dec 20 2017

Issue description

See https://chromium-review.googlesource.com/c/chromium/src/+/834885/4/third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-ime.html#181

Calling InputMethodController::CommitText() with empty text and no composition open doesn't change the text at all. Currently we fire beforeinput and textInput event, but don't fire input. We should either also fire the input event, or not fire any of these.
 
Labels: M-65
Status: Fixed (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 12 2018

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

commit 308f9ad3c2a3c91523c5efbbd426a533646d9d5c
Author: Ryan Landay <rlanday@chromium.org>
Date: Fri Jan 12 21:08:58 2018

Don't fire beforeinput and textInput events for no-op CommitText()

Currently, if an IME calls InputMethodController::CommitText() with no
composition open and passes an empty string, we fire the beforeinput and
textInput events (but *not* the input event). For consistency, it seems that we
should not fire any events in this case, since the edit operation doesn't
actually do anything.

Note: it *is* theoretically possible for an IME to use CommitText() with an
empty string just to move the selection. I'm not sure if this ever happens in
practice or not.

Bug:  796691 
Change-Id: Ic13acc6842e92910e9c5ce7842f8f7b908fdec42
Reviewed-on: https://chromium-review.googlesource.com/862517
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529067}
[modify] https://crrev.com/308f9ad3c2a3c91523c5efbbd426a533646d9d5c/third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-ime.html
[modify] https://crrev.com/308f9ad3c2a3c91523c5efbbd426a533646d9d5c/third_party/WebKit/Source/core/editing/ime/InputMethodController.cpp
[modify] https://crrev.com/308f9ad3c2a3c91523c5efbbd426a533646d9d5c/third_party/WebKit/Source/core/editing/ime/InputMethodControllerTest.cpp

Sign in to add a comment