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

Issue 652429 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocking:
issue 585875



Sign in to add a comment

InputEvent: |getTargetRanges()| should always return a range, even if it's current selection

Project Member Reported by chongz@chromium.org, Oct 3 2016

Issue description

There is no clear resolution about this, but according to
  https://github.com/w3c/input-events/issues/5#issuecomment-249962505
|getTargetRanges()| should always return a range, even if it's current selection.

Currently we return NULL if it's the same as the current selection.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 15 2017

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

commit 07359e3b41086b15af2bf433a28f1a4d8b31ff9b
Author: chongz <chongz@chromium.org>
Date: Wed Feb 15 05:45:24 2017

[InputEvent] Change |getTargetRanges()| to return current selection by default

For ContentEditable |getTargetRanges()| should:
  1. Return corresponding ranges for delete-content/word/line.
  2. Return current selection for other types.

For <input> and <textarea> |getTargetRanges()| should return empty array.

This CL matches Safari Technology Preview.

BUG= 652429 

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

[modify] https://crrev.com/07359e3b41086b15af2bf433a28f1a4d8b31ff9b/third_party/WebKit/LayoutTests/fast/events/inputevents/before-input-ranges.html
[modify] https://crrev.com/07359e3b41086b15af2bf433a28f1a4d8b31ff9b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/07359e3b41086b15af2bf433a28f1a4d8b31ff9b/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/07359e3b41086b15af2bf433a28f1a4d8b31ff9b/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/07359e3b41086b15af2bf433a28f1a4d8b31ff9b/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/07359e3b41086b15af2bf433a28f1a4d8b31ff9b/third_party/WebKit/Source/core/editing/EditorKeyBindings.cpp
[modify] https://crrev.com/07359e3b41086b15af2bf433a28f1a4d8b31ff9b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/07359e3b41086b15af2bf433a28f1a4d8b31ff9b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
[modify] https://crrev.com/07359e3b41086b15af2bf433a28f1a4d8b31ff9b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp

Comment 2 by chongz@chromium.org, Feb 15 2017

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

Sign in to add a comment