Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Issue 2628763003: Keyboard event should not insert a character at selection if selection doesn't have focus (Closed)

Created:
3 years, 11 months ago by yosin_UTC9
Modified:
3 years, 11 months ago
Reviewers:
yoichio, Xiaocheng
CC:
blink-reviews, chromium-reviews, hugoh_UTC2
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Keyboard event should not insert a character at selection if selection doesn't have focus This patch makes Blink not to insert a character at selection if selection doesn't have focus to align with other browser's behavior. The test expectation of "keypress-focus-change.html" is changed for moving focus on "keydown" event handler. In Firefox, it still insert a character at selection but Blink and Edge don't. On manual focus moving, Firefox also doesn't insert character. To unblock CL[1] as soon as possible, this patch uses ugly test case. Following patch will fix it. [1] http://crrev.com/2616623002: Do not send redundant ViewHostMsg_TextInputStateChanged-message BUG=89026 TEST=LayoutTests/editing/input/keyboard_event_without_focus.html Review-Url: https://codereview.chromium.org/2628763003 Cr-Commit-Position: refs/heads/master@{#443189} Committed: https://chromium.googlesource.com/chromium/src/+/c5138fa204cedceffaf7a7e777529a9a5d69964c

Patch Set 1 : 2017-01-11T14:15:42 #

Patch Set 2 : 2017-01-11T15:44:39 #

Patch Set 3 : 2017-01-12T13:25:32 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -4 lines) Patch
A third_party/WebKit/LayoutTests/editing/input/keyboard_event_without_focus.html View 1 chunk +36 lines, -0 lines 2 comments Download
M third_party/WebKit/LayoutTests/fast/events/keypress-focus-change.html View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/keypress-focus-change-expected.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditorKeyBindings.cpp View 1 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (19 generated)
hugoh_UTC2
3 years, 11 months ago (2017-01-12 05:36:09 UTC) #12
Xiaocheng
https://codereview.chromium.org/2628763003/diff/40001/third_party/WebKit/LayoutTests/editing/input/keyboard_event_without_focus.html File third_party/WebKit/LayoutTests/editing/input/keyboard_event_without_focus.html (right): https://codereview.chromium.org/2628763003/diff/40001/third_party/WebKit/LayoutTests/editing/input/keyboard_event_without_focus.html#newcode20 third_party/WebKit/LayoutTests/editing/input/keyboard_event_without_focus.html:20: // Insert |textField.value| to HTML for verification I think ...
3 years, 11 months ago (2017-01-12 08:31:02 UTC) #14
yosin_UTC9
PTAL I attempt to update |assert_selection()|, but it takes time. So, I would like to ...
3 years, 11 months ago (2017-01-12 09:10:53 UTC) #19
Xiaocheng
On 2017/01/12 at 09:10:53, yosin wrote: > PTAL > > > I attempt to update ...
3 years, 11 months ago (2017-01-12 09:12:08 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2628763003/40001
3 years, 11 months ago (2017-01-12 09:22:35 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/c5138fa204cedceffaf7a7e777529a9a5d69964c
3 years, 11 months ago (2017-01-12 09:27:28 UTC) #25
yoichio
3 years, 11 months ago (2017-01-13 02:04:07 UTC) #26
Message was sent while issue was closed.
https://codereview.chromium.org/2628763003/diff/40001/third_party/WebKit/Layo...
File
third_party/WebKit/LayoutTests/editing/input/keyboard_event_without_focus.html
(right):

https://codereview.chromium.org/2628763003/diff/40001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/editing/input/keyboard_event_without_focus.html:20:
// Insert |textField.value| to HTML for verification
On 2017/01/12 08:31:02, Xiaocheng wrote:
> I think we should modify assert_selection to report the actual value of
<input>
> (and probably <textarea>).
> 
> I'm not against it if you want to unblock
> https://codereview.chromium.org/2616623002 asap and fix the hack here later.

If assert_selection won't be used to test such
  input/textarea editing any more except this,
 it is bit overkill to impl that support in assert_selection.
(However, I guess assert_selection will:))
Then if we need one more layout test of input/textarea, we
 will impl in assert_selection.

Powered by Google App Engine
This is Rietveld 408576698