Opened 9 years ago

Last modified 8 years ago

#13820 confirmed Bug

backspace to beginning of line causes text to subsequently lose some formats

Reported by: Wayne Christian Owned by:
Priority: Normal Milestone:
Component: General Version: 4.4.1
Keywords: Blink Webkit Cc:

Description

Steps to reproduce

Using the full featured editor In Editor toolbar, set Font: Georgia Size: 24 Text Color: Green Background Color: Yellow

Start typing...

top

next1

next2

See this text in the expected format. Cool.

Go to newline; type 'mistake' (it is in expected Format),
then backspace to the beginning of the line to erase 'mistake'

type...

fixed

text

Expected result

the "fixed/text" should be in the same format as the previous text

Actual result

the formatting is erased and the text has no formatting

Other details (browser, OS, CKEditor version, installed plugins)

OS=Windows, Browser Chrome. This doesn't happen in IE11 or Firefox

Change History (12)

comment:1 Changed 9 years ago by Jakub Ś

Keywords: Blink Webkit added; format removed
Status: newconfirmed
Version: 4.4.74.4.1
  1. Paste below code into source mode and switch to wysiwyg
    <p><span style="color:#0000FF"><span style="font-size:20px">abc</span></span></p>
    
    <p><span style="color:#0000FF"><span style="font-size:20px">abc</span></span></p>
    
  2. Place cursor behind second 'abc' and press backspace 4 times. Cursor should be behind c in first paragraph 'abc^'
  3. Untill CKEditor 4.4 elements path was showing p span span but starting from CKEditor 4.4.1 it is just showing p

Problem concerns Blink and Webkit (tested with Safari on Mac) browsers.

comment:2 Changed 9 years ago by Jakub Ś

Other tickets relatedtto that problem: #13830, #12139, #13504, #5026 (Test 2), #13224, #13225.

comment:3 Changed 9 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.5

comment:4 Changed 9 years ago by Szymon Kupś

Owner: set to Szymon Kupś
Status: confirmedassigned

comment:5 Changed 9 years ago by Szymon Kupś

It looks like this issue started to be visible after introducing custom backspace/delete key handlers for webkits in git:53cc87b that after few changes looks like this.
Checking tc from comment:1:

  • When user press backspace for the first 3 times, browser is taking care of backspace handling - mergeBlocksCollapsedSelection returns false and custom handler is finishing processing this key event.
  • now contents of the editor looks like this:
    <p><span style="color:#0000FF"><span style="font-size:20px">abc</span></span></p>
    <p>&nbsp;</p>
    
  • next backspace press is fully handled by mergeBlocksCollapsedSelection, two blocks are merged, collapsed selection is placed at the end of the second paragraph, not inside styled spans.

The big question is, how should we handle such situations?

comment:6 Changed 9 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.5CKEditor 4.5.6

comment:7 Changed 9 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.6CKEditor 4.5.7

comment:8 Changed 9 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.7CKEditor 4.5.8

comment:9 Changed 9 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.8CKEditor 4.5.9

comment:10 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.9CKEditor 4.5.10

comment:11 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.10CKEditor 4.5.11

Moving tickets to the next milestone.

comment:12 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.11
Owner: Szymon Kupś deleted
Status: assignedconfirmed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy