New issue
Advanced search Search tips

Issue 869512 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Aug 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

FrameInputHandlerImpl::Replace() does not select word around caret

Project Member Reported by tnijssen@google.com, Jul 31

Issue description

Chrome Version: 69.0.3497.12
OS: MacOS 10.13.6

What steps will reproduce the problem?
(1) Call FrameInputHandlerImpl::Replace() or a method that calls FrameInputHandlerImpl::Replace() with only a caret (no current selection).

What is the expected result?
The word around the caret is replaced.

What happens instead?
The new word is inserted at the caret and the word around the caret is not removed.



 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 31

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

commit cb4583bb960e3d85c0453f07c574b233f8f244bf
Author: Tessa Nijssen <tnijssen@google.com>
Date: Tue Jul 31 20:09:17 2018

Fix Selection in  FrameInputHandlerImpl::Replace()

According to the description for Replace() in input_handler.mojom,
Replace() will replace the current selection, and if there is none, it
will select the word around the caret and replace that word.

However, in FrameInputHandlerImpl::Replace(), the word around the caret
is only selected if there is a selection (and not just a caret). This
is not in line with the description given above.

To fix this, the check that the WebLocalFrame has a selection is
negated. If the WebLocalFrame does not have a selection, the word
around the caret should be selected. Otherwise, the selection should
be left as is.

Bug:  869512 
Change-Id: I288ab40fcfa10e0c04ad442e25f2404e0c700a14
Reviewed-on: https://chromium-review.googlesource.com/1157035
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579546}
[modify] https://crrev.com/cb4583bb960e3d85c0453f07c574b233f8f244bf/content/renderer/input/frame_input_handler_impl.cc

Status: Fixed (was: Untriaged)

Sign in to add a comment