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

Issue 796690 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::SetComposition() with empty text and no composition open doesn't fire beforeinput or textInput events

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#54

When SetComposition() is called with empty text and no composition open and some text selected, we delete the selection. Currently we only fire an input event in this case. We should also be firing beforeinput and textInput events.
 
textInput is deprecated, so I'm not changing its behavior. I will add the beforeinput.
Project Member

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

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

commit 0d331b4d9460618ebf29546593e74f940b77621d
Author: Ryan Landay <rlanday@chromium.org>
Date: Thu Jan 18 19:58:31 2018

Add a missing beforeinput event in InputMethodController::SetComposition()

Currently, if an IME calls InputMethodController::SetComposition() with an empty
replacement string when no composition is open but some text is selected (so
the effect is to delete the selected text), we fire an input event, but not a
beforeinput event. This CL adds the beforeinput event.

This CL also fixes the same issue for
InputMethodController::DeleteSurroundingText().

Bug:  796690 ,802381
Change-Id: Icc0226103e515d51aa58ab7c8c4bed1f1180b0a3
Reviewed-on: https://chromium-review.googlesource.com/862521
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530239}
[modify] https://crrev.com/0d331b4d9460618ebf29546593e74f940b77621d/third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-ime.html
[modify] https://crrev.com/0d331b4d9460618ebf29546593e74f940b77621d/third_party/WebKit/Source/core/editing/ime/InputMethodController.cpp
[modify] https://crrev.com/0d331b4d9460618ebf29546593e74f940b77621d/third_party/WebKit/Source/core/editing/ime/InputMethodController.h

Labels: M-65
Status: Fixed (was: Assigned)

Sign in to add a comment