New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 24 users
Status: Fixed
Owner:
Last visit 29 days ago
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment
ContentEditable:   is forced on SPACE between text nodes
Reported by fre...@fredck.com, Oct 22 2013 Back to list
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36

Steps to reproduce the problem:
In contenteditable, if you hit SPACE in-between two successive text nodes, a   is being inserted instead of a plain space.

The attached test page makes the issue clear.

Confirmed on both Safari and Chrome. Works fine with Firefox.

What is the expected behavior?

What went wrong?
A plain space should be inserted.

Did this work before? N/A 

Chrome version: 30.0.1599.69  Channel: stable
OS Version: OS X 10.8.5
Flash Version: Shockwave Flash 11.9 r900

Cross post on WebKit:
https://bugs.webkit.org/show_bug.cgi?id=123163
 
broken_text_node_bug.html
1.0 KB View Download
Comment 1 by fre...@fredck.com, Oct 22 2013
Related CKEditor issue: http://dev.ckeditor.com/ticket/9929
Comment 2 by meh...@chromium.org, Oct 22 2013
Labels: Cr-Blink
Comment 3 by tkent@chromium.org, Oct 23 2013
Labels: Cr-Blink-Editing
Confirmed on Chromium 30.0.1599.15 running on Gentoo Linux amd64.

It's worth noting that non-breaking spaces also appear when copy-pasting parts of texts: this happens on pasted selection boundaries, when boundaries are spaces.

Works fine on Opera Presto.
Comment 5 by yosin@chromium.org, Aug 29 2014
Labels: -Cr-Blink Cr-Blink-Editing-Command
Comment 6 by Deleted ...@, Sep 25 2014
This bug still exists in Google Chrome 37.0.2062.124 and OS X 10.9.4, are there any plans to fix this bug?
on chrome 38, this bug still exist

on space press in contenteditable box, no space insert.
Any progress on this? Chrome 43 still the same bug. 
Comment 9 by yosin@chromium.org, Aug 13 2015
Status: Available
This info may help.  The characters & n b s p ; are not being inserted.  A single character is being inserted: ASCII code 255.  This has the unfortunate side-effect of causing two text nodes to be joined together as one when trying to word wrap.  So, let X stand for char 255 in this example.  "twoXwords" is considered ONE word, not two words.  The char 255   joins the two, and thw words will not wrap correctly.
This (or something quite similar) is still a problem in Chrome version 47.0.2526.

For example, in Mailchimp's template editor in a content edit field, type TWO WORDS. Using the mouse cursor click on the W so that the caret appears immediately to the left of the W. Hit the backspace key, then the spacebar. What you get is a non-breaking space, not a regular space. Exactly the same sequence of events in IE 11 yields a regular space character, as it should. 
I've initiated this bug report three years ago at CKed devs who correctly forwarded it to chrome devs and these apparently don't give a damn. Is the anybody out there?
Comment 13 by rmel@google.com, Apr 19 2016
Still happening.  I think this is why there's bad word wrapping when people paste links into Hangouts after a colon...
Project Member Comment 14 by bugdroid1@chromium.org, Jul 27 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8134eeb454ef76c72df8cd7c26f6141072c314cb

commit 8134eeb454ef76c72df8cd7c26f6141072c314cb
Author: joone.hur <joone.hur@intel.com>
Date: Wed Jul 27 00:04:40 2016

Add a plain space instead of &nbsp; between text nodes

When we rebalance white spaces, &nbsp; can be added as space
under some conditions. This CL adds a condition that the next
sibling text node should not exist.

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

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

[modify] https://crrev.com/8134eeb454ef76c72df8cd7c26f6141072c314cb/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/8134eeb454ef76c72df8cd7c26f6141072c314cb/third_party/WebKit/LayoutTests/editing/inserting/insert-space.html
[modify] https://crrev.com/8134eeb454ef76c72df8cd7c26f6141072c314cb/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-003-expected.txt
[modify] https://crrev.com/8134eeb454ef76c72df8cd7c26f6141072c314cb/third_party/WebKit/LayoutTests/editing/pasteboard/smart-paste-003-trailing-whitespace-expected.txt
[modify] https://crrev.com/8134eeb454ef76c72df8cd7c26f6141072c314cb/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/8134eeb454ef76c72df8cd7c26f6141072c314cb/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/8134eeb454ef76c72df8cd7c26f6141072c314cb/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Project Member Comment 15 by bugdroid1@chromium.org, Jul 27 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bd872028af92820466c57c8bb7b1234d025743ca

commit bd872028af92820466c57c8bb7b1234d025743ca
Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org>
Date: Wed Jul 27 01:26:20 2016

Auto-rebaseline for r407981

https://chromium.googlesource.com/chromium/src/+/8134eeb45

BUG= 310149 
TBR=joone.hur@intel.com

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

Cr-Commit-Position: refs/heads/master@{#408008}

[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/android/editing/execCommand/find-after-replace-expected.png
[add] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/android/editing/pasteboard/5028447-expected.png
[add] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/android/editing/pasteboard/5028447-expected.txt
[add] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/android/editing/pasteboard/unrendered-br-expected.txt
[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/linux/editing/execCommand/find-after-replace-expected.png
[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/linux/editing/pasteboard/5028447-expected.png
[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/linux/editing/pasteboard/5028447-expected.txt
[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/linux/editing/pasteboard/unrendered-br-expected.txt
[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/mac/editing/pasteboard/unrendered-br-expected.txt
[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/win/editing/execCommand/find-after-replace-expected.png
[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/win/editing/execCommand/find-after-replace-expected.txt
[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/win/editing/pasteboard/5028447-expected.png
[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/win/editing/pasteboard/5028447-expected.txt
[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/win/editing/pasteboard/smart-paste-003-expected.txt
[modify] https://crrev.com/bd872028af92820466c57c8bb7b1234d025743ca/third_party/WebKit/LayoutTests/platform/win/editing/pasteboard/unrendered-br-expected.txt

Owner: joone....@intel.com
Status: Fixed
Labels: -OS-Mac OS-All
Sign in to add a comment