Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12503 closed Bug (fixed)

[Blink/Webkit] Incorrect result of select all, backspace/delete

Reported by: Piotrek Koszuliński Owned by: Artur Delura
Priority: Normal Milestone: CKEditor 4.5.0 Beta
Component: General Version:
Keywords: Cc: a.nowodzinski@…

Description (last modified by Artur Delura)

  1. Open replacebycode sample.
  2. CTRL+A.
  3. Delete/backspace.
  4. Execute following code in console.
    CKEDITOR.instances.editor1.editable().getHtml();
    

Result:

<h1><small><a data-cke-saved-href="http://en.wikipedia.org/wiki/Apollo_11" href="http://en.wikipedia.org/wiki/Apollo_11"></a></small>​{}</h1>

Expected (as on FF):

<p>[]<br></p>

or (if that's going to be much easier to implement):

<h1>[]<br></h1>

(because <h1> was the first block before pressing backspace)

  • #8439, #8440 - should be fixed by patch for this issue,
  • this issue was introduced by fixes for #9998.

Change History (7)

comment:1 Changed 9 years ago by Piotrek Koszuliński

Description: modified (diff)
Milestone: CKEditor 4.5.0
Status: newconfirmed

comment:2 Changed 9 years ago by Artur Delura

Description: modified (diff)

comment:3 Changed 9 years ago by Artur Delura

Owner: set to Artur Delura
Status: confirmedassigned

comment:4 Changed 9 years ago by Artur Delura

What I see here is that after pressing delete/backspace editor move whole content from last editable child to first one and empty text content. Based on that I simpified use case:

Having:

<h1>Apollo 11</h1><p><small>Source</small></p>

I above situation first child is <h1>, last one is <p>. After pressing delete/backspace Whole content from <p> has been moved to <h1>. As result we got this:

<h1><small></small>></h1>

comment:5 Changed 9 years ago by Artur Delura

Status: assignedreview

Small element has been moved to header by this code. Changes and tests in branch:t/12503.

comment:6 Changed 9 years ago by Piotr Jasiun

Resolution: fixed
Status: reviewclosed

On Firefox I get <br> instead of <p><br></p> randomly in manual test, but I met the same behavior on major branch. It occurred randomly and I am not able to reproduce it on console (apparently bluring editor fix issue). Also I was not able to reproduce it with open Firefox DOM inspector, so there is nothing to report.

Closed with git:e9db567.

comment:7 Changed 9 years ago by Piotr Jasiun

This patch does not change behavior of #8439 and #8440.

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