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

Issue 657631 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug-Regression

Blocking:
issue 659109



Sign in to add a comment

Two spaces are collapsed into one between text nodes

Project Member Reported by joone....@intel.com, Oct 19 2016

Issue description

Version: ToT(56.0.2896.0)
OS: All

What steps will reproduce the problem?

In contenteditable, if you hit SPACE in-between two successive text nodes (the second text has a leading space(plain), a plain space is being inserted instead of a nbsp. See https://jsfiddle.net/cubix/ndcy52co/

What is the expected output?
A nbsp should be inserted. As a result, two spaces should exist between the text nodes.

What do you see instead?
A plain space is inserted. As a result, two plain spaces are collapsed into one plain space.

This is a regression caused by https://codereview.chromium.org/2175163004.

 

Comment 1 by joone....@intel.com, Oct 19 2016

Summary: Two spaces are collapsed into one between text nodes (was: A regular space is added between text nodes, but the second node has a regular space at startat the end of text node that has the sibling text )

Comment 2 by joone....@intel.com, Oct 20 2016

Description: Show this description

Comment 3 by yosin@chromium.org, Oct 20 2016

Cc: -yosin@chromium.org
In review: http://crrev.com/2432083003

Note: When component is under Blink>Editing, crbug send me email when a comment is added. So, you don't need to put me at Cc.
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 20 2016

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

commit 952d55918cdb455223cabf647cef859486a37b0f
Author: joone.hur <joone.hur@intel.com>
Date: Thu Oct 20 06:12:35 2016

Add a nbsp at the the end of the text when the next text has a leading space.

This is a regression caused by https://codereview.chromium.org/2175163004.
The above CL adds a plain space between text nodes, but a nbsp should be added
if the next text node has a leading plain space. If not, two spaces are
collapsed into one plain space.

BUG= 657631 
TEST=editing/inserting/insert-space.html

Review-Url: https://chromiumcodereview.appspot.com/2432083003
Cr-Commit-Position: refs/heads/master@{#426420}

[modify] https://crrev.com/952d55918cdb455223cabf647cef859486a37b0f/third_party/WebKit/LayoutTests/editing/inserting/insert-space.html
[modify] https://crrev.com/952d55918cdb455223cabf647cef859486a37b0f/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Comment 5 by rbyers@chromium.org, Oct 27 2016

Blocking: 659109

Comment 6 by yosin@chromium.org, Nov 2 2016

Status: Fixed (was: Started)
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 2 2016

Labels: merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9ebff223d5d639167c3efb01a5fa912b3aee05a9

commit 9ebff223d5d639167c3efb01a5fa912b3aee05a9
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Nov 02 06:26:34 2016

Add a nbsp at the the end of the text when the next text has a leading space.

This is a regression caused by https://codereview.chromium.org/2175163004.
The above CL adds a plain space between text nodes, but a nbsp should be added
if the next text node has a leading plain space. If not, two spaces are
collapsed into one plain space.

BUG= 657631 
TEST=editing/inserting/insert-space.html

Review-Url: https://chromiumcodereview.appspot.com/2432083003
Cr-Commit-Position: refs/heads/master@{#426420}
(cherry picked from commit 952d55918cdb455223cabf647cef859486a37b0f)

Review URL: https://codereview.chromium.org/2473633002 .

Cr-Commit-Position: refs/branch-heads/2883@{#419}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/9ebff223d5d639167c3efb01a5fa912b3aee05a9/third_party/WebKit/LayoutTests/editing/inserting/insert-space.html
[modify] https://crrev.com/9ebff223d5d639167c3efb01a5fa912b3aee05a9/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Cc: sureshkumari@chromium.org
Labels: Needs-Feedback
Tested the issue on windows-7, Mac-10.11.6 and Linux Ubuntu-14.04 using chrome Beta-55.0.2883.44 with the below steps
1.opened chrome
2.Navigated to the url  https://jsfiddle.net/cubix/ndcy52co/
3.Hit the spacebar between A and B
Observed the output as per the screen-cast 55.0.2883.44(657631)mp4.
Please find the attached screen-cast and please confirm is it the expected behavior?
Note: Please find the reported version screen-cast 56.0.2896.0(657631).mp4.


Thanks..
55.0.2883.44(657631).mp4
524 KB View Download
56.0.2896.0(657631).mp4
601 KB View Download
I tested it in Version 56.0.2910.0. It works fine like 55.0.2883.44(657631).
Labels: -Needs-Feedback TE-Verified-55.0.2883.44 TE-Verified-M55
As per the comment#9 adding TE-Verified labels.

Sign in to add a comment