[CKEditor Dev] #11415: [Chrome]  instead of space before link

33 views
Skip to first unread message

CKEditor

unread,
Jan 15, 2014, 9:21:43 AM1/15/14
to ckeditor...@googlegroups.com
#11415: [Chrome]  instead of space before link
---------------------+---------------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: new
Priority: Normal | Milestone:
Component: General | Version: 3.6.6 (SVN - trunk)
Keywords: |
---------------------+---------------------------------
1. Open editor (replacebyclass.html) and inset following html in source
mode:
{{{
<p>Source: <a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
}}}
2. Switch back to WYSIWYG mode.
3. Put cursor just before 'Wikipedia.org'.
4. Press backspace.
5. Press space.
6. Go to source mode.

Result:
You will see:
{{{
<p>Source:&nbsp;<a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
}}}

Expected:
There should be " " instead of "&nbsp;".

In FF everything is fine.

Probably related: #10359

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415>
CKEditor <http://ckeditor.com/>
The text editor for the Internet

CKEditor

unread,
Jan 15, 2014, 9:21:54 AM1/15/14
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; instead of space before link
----------------------+---------------------------------

Reporter: pjasiun | Owner:
Type: Bug | Status: new
Priority: Normal | Milestone:
Component: General | Version: 3.6.6 (SVN - trunk)
Resolution: | Keywords:
----------------------+---------------------------------

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:1>

CKEditor

unread,
Jan 15, 2014, 9:25:06 AM1/15/14
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; instead of space before link
----------------------+---------------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed

Priority: Normal | Milestone:
Component: General | Version: 3.6.6 (SVN - trunk)
Resolution: | Keywords:
----------------------+---------------------------------
Changes (by m.lewandowski):

* status: new => confirmed


Comment:

confirmed but i belive there is already ticket for that somewhere

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:2>

CKEditor

unread,
Jan 15, 2014, 9:25:51 AM1/15/14
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; instead of space before link
----------------------+---------------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed

Priority: Normal | Milestone:
Component: General | Version: 3.6.6 (SVN - trunk)
Resolution: | Keywords:
----------------------+---------------------------------
Description changed by pjasiun:

Old description:

> 1. Open editor (replacebyclass.html) and inset following html in source
> mode:
> {{{
> <p>Source: <a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
> }}}
> 2. Switch back to WYSIWYG mode.
> 3. Put cursor just before 'Wikipedia.org'.
> 4. Press backspace.
> 5. Press space.
> 6. Go to source mode.
>
> Result:
> You will see:
> {{{
> <p>Source:&nbsp;<a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
> }}}
>
> Expected:
> There should be " " instead of "&nbsp;".
>
> In FF everything is fine.
>
> Probably related: #10359

New description:

1. Open editor (replacebyclass.html) and inset following html in source
mode:
{{{
<p>Source: <a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
}}}
2. Switch back to WYSIWYG mode.
3. Put cursor just before 'Wikipedia.org'.
4. Press backspace.
5. Press space.
6. Go to source mode.

Result:
You will see:
{{{
<p>Source:&nbsp;<a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
}}}

Expected:
There should be " " instead of "&nbsp;".

In FF everything is fine.

Probably related: #10359 and #9998

--

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:3>

CKEditor

unread,
Jan 20, 2014, 11:09:10 AM1/20/14
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; instead of space before link
----------------------+--------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:
Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+--------------------------
Changes (by j.swiderski):

* keywords: => Webkit Blink
* version: 3.6.6 (SVN - trunk) => 3.0


Comment:

Problem can be reproduced from CKEditor 3.0 win Webkit and Blink browsers.

This ticket is a continuation of #9929. We have fixed raw text problems
but not text plus some element.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:4>

CKEditor

unread,
Aug 14, 2014, 9:10:42 PM8/14/14
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; instead of space before link
----------------------+--------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:

Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+--------------------------

Comment (by frankfarm):

This problem also happens with source code

<p>foo bar</p>

then return to wysiwyg mode, delete the space, then press space to obtain

<p>foo&nbsp;bar</p>

In other words, it does not occur only adjacent to an anchor element.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:5>

CKEditor

unread,
Aug 18, 2014, 8:10:18 PM8/18/14
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; instead of space before link
----------------------+--------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:

Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+--------------------------

Comment (by frankfarm):

This problem also happens in CKEditor 4.4.3 (Standard) (revision fd4f17c)
currently at http://ckeditor.com/demo

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:6>

CKEditor

unread,
Aug 19, 2014, 3:23:27 AM8/19/14
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; instead of space before link
----------------------+--------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:

Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+--------------------------
Description changed by j.swiderski:

Old description:

> 1. Open editor (replacebyclass.html) and inset following html in source
> mode:
> {{{
> <p>Source: <a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
> }}}
> 2. Switch back to WYSIWYG mode.
> 3. Put cursor just before 'Wikipedia.org'.
> 4. Press backspace.
> 5. Press space.
> 6. Go to source mode.
>
> Result:
> You will see:
> {{{
> <p>Source:&nbsp;<a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
> }}}
>
> Expected:
> There should be " " instead of "&nbsp;".
>
> In FF everything is fine.
>

> Probably related: #10359 and #9998

New description:

1. Open editor (replacebyclass.html) and inset following html in source
mode:
{{{
<p>Source: <a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
}}}
2. Switch back to WYSIWYG mode.
3. Put cursor just before 'Wikipedia.org'.
4. Press backspace.
5. Press space.
6. Go to source mode.

Result:
You will see:
{{{
<p>Source:&nbsp;<a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
}}}

Expected:
There should be " " instead of "&nbsp;".

In FF everything is fine.

Probably related: #10359 and #9998

----

This ticket looks like continuation of #9929. **The problem is that #9929
was fixed in CKE 4.2.3 but it seems it has reappeared again in CKE 4.4.1**

--

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:7>

CKEditor

unread,
Aug 19, 2014, 3:35:36 AM8/19/14
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+--------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:

Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+--------------------------
Description changed by j.swiderski:

Old description:

> 1. Open editor (replacebyclass.html) and inset following html in source


> mode:
> {{{
> <p>Source: <a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
> }}}
> 2. Switch back to WYSIWYG mode.
> 3. Put cursor just before 'Wikipedia.org'.
> 4. Press backspace.
> 5. Press space.
> 6. Go to source mode.
>
> Result:
> You will see:
> {{{
> <p>Source:&nbsp;<a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
> }}}
>
> Expected:
> There should be " " instead of "&nbsp;".
>
> In FF everything is fine.
>

> Probably related: #10359 and #9998
>
> ----
>
> This ticket looks like continuation of #9929. **The problem is that #9929
> was fixed in CKE 4.2.3 but it seems it has reappeared again in CKE
> 4.4.1**

New description:

This ticket looks like continuation of #9929. **The problem is that #9929
was fixed in CKE 4.2.3 but it seems it has reappeared again in CKE 4.4.1**

Besides below TC with link you can also reproduce this problem with:
1. Paste below in source mode and switch to wysiwyg.
{{{
<p>This is a simple sentence.</p>
}}}
2. Remove space with backspace or delete and then insert it again. Result:
{{{
<p>This&nbsp;is&nbsp;a&nbsp;simple&nbsp;sentence.</p>
}}}

----

1. Open editor (replacebyclass.html) and inset following html in source
mode:
{{{
<p>Source: <a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
}}}
2. Switch back to WYSIWYG mode.
3. Put cursor just before 'Wikipedia.org'.
4. Press backspace.
5. Press space.
6. Go to source mode.

Result:
You will see:
{{{
<p>Source:&nbsp;<a href="http://en.wikipedia.org/">Wikipedia.org</a></p>
}}}

Expected:
There should be " " instead of "&nbsp;".

In FF everything is fine.

Probably related: #10359 and #9998

--

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:8>

CKEditor

unread,
Oct 27, 2014, 5:24:23 PM10/27/14
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+--------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:

Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+--------------------------

Comment (by frankfarm):

This problem also happens with source code

<p>foo bar</p>

then return to wysiwyg mode, select "bar", copy, place the cursor before
the f in "foo", paste, press Spacebar, switch to source mode to obtain

<p>bar&nbsp;foo bar</p>

Happens in CKEditor 4.4.5 (Standard) (revision 25cdcad) currently at
http://ckeditor.com/demo in Google Chrome 38.0.2125.104 on OS 10.9.5.

The same problem does not occur in Firefox 31.0 on OS 10.9.5.

In other words, the problem also occurs when pressing Spacebar directly
after a paste.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:9>

CKEditor

unread,
Mar 23, 2016, 3:47:35 PM3/23/16
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+--------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:

Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+--------------------------

Comment (by lyuba):

Hi, this problem is still happening in the current release (just checked
on http://ckeditor.com/demo). Any hopes in getting it fixed?

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:10>

CKEditor

unread,
Jul 6, 2016, 8:35:49 AM7/6/16
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+--------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:

Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+--------------------------

Comment (by j.swiderski):

#14718 and #14379 were marked as duplicates.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:11>

CKEditor

unread,
Aug 27, 2016, 2:51:21 PM8/27/16
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+--------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:

Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+--------------------------

Comment (by jmal73):

This needs to be fixed! ckEditor is not use-able for Windows Chrome as it
puts in &nbsp; every time you try and edit anything. I reported this bug
7 months ago on Ticket#14379 http://dev.ckeditor.com/ticket/14379. Chrome
for Windows is the most popular browser and I don't understand why it
hasn't been fixed yet?

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:12>

CKEditor

unread,
Aug 29, 2016, 7:11:45 AM8/29/16
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+----------------------------
Reporter: pjasiun | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone: CKEditor 4.6.0

Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+----------------------------
Changes (by m.lewandowski):

* milestone: => CKEditor 4.6.0


--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:13>

CKEditor

unread,
Aug 30, 2016, 7:58:58 AM8/30/16
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+----------------------------
Reporter: pjasiun | Owner: Tade0
Type: Bug | Status: assigned

Priority: Normal | Milestone: CKEditor 4.6.0
Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+----------------------------
Changes (by Tade0):

* owner: => Tade0
* status: confirmed => assigned


--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:14>

CKEditor

unread,
Aug 30, 2016, 9:08:23 AM8/30/16
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+----------------------------
Reporter: pjasiun | Owner: Tade0
Type: Bug | Status: assigned
Priority: Normal | Milestone: CKEditor 4.6.0
Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+----------------------------

Comment (by Tade0):

I found that when the user presses `backspace`, a newline character is
inserted where the space character was a moment ago.

The same behaviour does not occur in a raw, native `contenteditable`
element.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:15>

CKEditor

unread,
Aug 30, 2016, 9:57:04 AM8/30/16
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+----------------------------
Reporter: pjasiun | Owner: Tade0
Type: Bug | Status: assigned
Priority: Normal | Milestone: CKEditor 4.6.0
Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+----------------------------

Comment (by Tade0):

The function that adds this newline is located here:
https://github.com/ckeditor/ckeditor-
dev/blob/10377f5c07798160a8840eacda4ffa745cc3c03d/core/editable.js#L2340

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:16>

CKEditor

unread,
Aug 30, 2016, 10:22:42 AM8/30/16
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+----------------------------
Reporter: pjasiun | Owner: Tade0
Type: Bug | Status: assigned
Priority: Normal | Milestone: CKEditor 4.6.0
Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+----------------------------

Comment (by Tade0):

The precise point where the newline insertion happens is here:
https://github.com/ckeditor/ckeditor-
dev/blob/10377f5c07798160a8840eacda4ffa745cc3c03d/core/dom/range.js#L1152

Call stack:
{{{
checkStartOfBlock (range.js:2345)
mergeBlocksCollapsedSelection (editable.js:2349)
...
}}}

CKEditor

unread,
Sep 1, 2016, 6:12:33 AM9/1/16
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+----------------------------
Reporter: pjasiun | Owner: Tade0
Type: Bug | Status: assigned
Priority: Normal | Milestone: CKEditor 4.6.0
Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+----------------------------

Comment (by Tade0):

After an extensive exercise in archeology I found the reason why
`range.trim()` was put in `range.checkStartOfBlock()` in the first place.

Judging by what I know now the solution to the problem described in this
ticket would be to make `range.checkStartOfBlock()` non-destructive and
this is what I am planning to do.

This is also a perfect opportunity to document what this method does.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:17>

CKEditor

unread,
Sep 1, 2016, 10:03:31 AM9/1/16
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+----------------------------
Reporter: pjasiun | Owner: Tade0
Type: Bug | Status: assigned
Priority: Normal | Milestone: CKEditor 4.6.0
Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+----------------------------

Comment (by jmal73):

Tade0 wrote, when the user presses `backspace` the issue occurs... the
same result happens when the `delete` key is pressed to as well.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:18>

CKEditor

unread,
Sep 1, 2016, 11:18:14 AM9/1/16
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
----------------------+----------------------------
Reporter: pjasiun | Owner: Tade0
Type: Bug | Status: review

Priority: Normal | Milestone: CKEditor 4.6.0
Component: General | Version: 3.0
Resolution: | Keywords: Webkit Blink
----------------------+----------------------------
Changes (by Tade0):

* status: assigned => review


Comment:

Summary of the reasons for this bug and the solution.

Problem: `range.checkStartOfBlock()` splits the text node at which a
collapsed selection is anchored when pressing backspace/delete. This later
forces the editor to produce a non-breaking space at that point.

The way `range.checkStartOfBlock()` and `range.checkEndOfBlock()` work is
validated by the following tests:
http://tests.ckeditor.dev:1030/tests/core/dom/range/blockindication

From which one can notice that the former returns true for: `<p> ^Test
</p>` - this result is achieved by using `range.trim()`.

----

Starting with #3367 `CKEDITOR.dom.walker` was calling `range.trim()` so to
prevent it from making changes while walking the same method was
preemptively called in `range.checkStartOfBlock()`.

Starting with #8632 `CKEDITOR.dom.walker` stopped calling `range.trim()`
but the same change was not made in `range.checkStartOfBlock()`, so ''it
remained destructive''.

----

The changes I've made basically simulate the same split mentioned earlier,
but without touching the DOM. From now on both `range.checkStartOfBlock()`
and `range.checkEndOfBlock()` do not make any changes in the DOM.

Tested on Chrome, Firefox, IE11 using both backspace and delete.

Changes pushed to branch:t/11415.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:19>

CKEditor

unread,
Jan 20, 2017, 2:22:04 PM1/20/17
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
-------------------------------------------------+-------------------------

Reporter: pjasiun | Owner: Tade0
Type: Bug | Status: review
Priority: Nice to have (we want to work on | Milestone:
it) |

Component: General | Version: 3.0
Resolution: | Keywords: Webkit
| Blink
-------------------------------------------------+-------------------------

Comment (by gnomon):

I cannot see why Priority was changed to "Nice to have" here. I think the
&nbsp; bug is simply unacceptable and must not be considered as "to be
dealt with" by the CKEditor users confronted with this bug! And, this bug
has been there for such a long time now, be it as reappearing or not!

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:23>

CKEditor

unread,
Feb 18, 2017, 3:01:17 AM2/18/17
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
-------------------------------------------------+-------------------------
Reporter: pjasiun | Owner: Tade0
Type: Bug | Status: review
Priority: Nice to have (we want to work on | Milestone:
it) |
Component: General | Version: 3.0
Resolution: | Keywords: Webkit
| Blink
-------------------------------------------------+-------------------------

Comment (by gnomon):

IF one is working within the Chrome browser, this really is a considerable
problem!

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:24>

CKEditor

unread,
May 23, 2017, 3:04:54 AM5/23/17
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
-------------------------------------------------+-------------------------
Reporter: pjasiun | Owner: Tade0
Type: Bug | Status: review
Priority: Nice to have (we want to work on | Milestone:
it) |
Component: General | Version: 4.6.2

Resolution: | Keywords: Webkit
| Blink
-------------------------------------------------+-------------------------
Changes (by standus0):

* version: 3.0 => 4.6.2


Comment:

I have last version of CK 4.6.2, last version of Chrome 58 and Canary 60.
FF and IE is OK.
This bug is still alive!!!
This is my content: <p style="text-align: center;">aaa &nbsp; &nbsp;
&nbsp; &nbsp;bbb</p>
When I pressing SPACE repeately, CK showing space and then nbsp.
I expect that if you have any information about bug you will cooperate
with browser vendor. This bug is absolutely not acceptable.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:25>

CKEditor

unread,
Jul 4, 2017, 9:11:02 AM7/4/17
to ckeditor...@googlegroups.com
#11415: [Chrome] &nbsp; is inserted instead of space.
-------------------------------------------------+-------------------------
Reporter: pjasiun | Owner: Tade0
Type: Bug | Status: review
Priority: Nice to have (we want to work on | Milestone:
it) |
Component: General | Version: 4.6.2
Resolution: | Keywords: Webkit
| Blink
-------------------------------------------------+-------------------------

Comment (by j.swiderski):

From what I have checked, first issue is no longer reproducible in Chrome
but it is still reproducible in Safari. Second issue is reproducible in
both browsers.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11415#comment:26>

Reply all
Reply to author
Forward
0 new messages