Opened 5 years ago

Last modified 5 years ago

#11322 confirmed New Feature

Impossible to delete some block elements at the beginning of content

Reported by: Wiktor Walc Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: IE Blink Webkit Cc: ankush.ghosal@…

Description

For certain block elements inside CKEditor, if an element is at the beginning of the content, it is impossible to delete it using the Backspace key.

Sample elements: <form>, <blockquote>, <div>

Note: deleting does work in one particular case: only if there is no content after the element, so make sure to add some text to the content as well.

Test Case 1

  1. http://ckeditor.com/latest/samples/replacebyclass.html
  2. Paste in source mode
<blockquote>
<p>&nbsp;</p>
</blockquote>

<p>Text</p>
  1. Switch to wysiwyg, place cursor in the Blockqoute element, press Backspace
  2. Result: Blockqoute is not deleted.

Note 2: Pressing enter deletes Blockqoute (?)

Test Case 2

Repeat steps 1-4 with:

<form action="a" name="n">&nbsp;</form>

<p>Text</p>

(Enter key works as expected)

Test Case 3

Repeat steps 1-4 with

<div class="class">
<p>&nbsp;</p>
</div>

<p>Text</p>

(Enter key works as expected)

It is technically possible to workaround this bug by using magic line to insert first an element above (or use the Source mode), but I don't think that's a real solution for this bug.

Change History (3)

comment:1 Changed 5 years ago by Wiktor Walc

Cc: ankush.ghosal@… added

comment:2 Changed 5 years ago by Jakub Ś

Keywords: IE Blink Webkit added
Status: newconfirmed
Version: 4.0

Problem can be reproduced from CKEditor 3.0 in both CKE 3.x and 4.x.

Problem is not reproducible in Firefox.

Finally use below code in HTML5 page and you will get same result what makes me think this is a "won't fix" issue:

<div style="margin: 20px; border:1px solid black; width:500px;" contenteditable="true">
<blockquote>
<p>&nbsp;</p>
</blockquote>

<p>Text</p>
backspace key</h2>
</div>

comment:3 Changed 5 years ago by Jakub Ś

Type: BugNew Feature

This can be handled when custom handling for delete and backspace will be implemented.

Last edited 5 years ago by Jakub Ś (previous) (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy