Opened 5 years ago

Last modified 5 years ago

#11270 confirmed Bug

Delete pressed in table cell causes an error when magicline is visible

Reported by: Piotrek Koszuliński Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description (last modified by Piotrek Koszuliński)

Use this HTML:

<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
	<tbody>
		<tr>
			<td>
			<p>&nbsp;</p>
			</td>
			<td>&nbsp;</td>
		</tr>
	</tbody>
</table>
  1. Place caret in first table cell.
  2. Move your mouse cursor to a place which will trigger magicline.
  3. Press delete.
  4. Error is thrown.
Uncaught TypeError: Cannot read property 'type' of null range.js:1526
CKEDITOR.dom.range.setStart range.js:1526
CKEDITOR.dom.range.setStartAfter range.js:1573
CKEDITOR.dom.range.setStartAt range.js:1618
CKEDITOR.dom.range.moveToPosition range.js:1489
CKEDITOR.dom.range.moveToElementEditablePosition range.js:2047
CKEDITOR.dom.range.moveToElementEditEnd range.js:2157
(anonymous function)

Starts in: https://github.com/ckeditor/ckeditor-dev/blob/c240965c7134620f8d2fe2c36f865197dc280aa9/core/editable.js#L653

Reproduced it on every browser.

Attachments (1)

delete-in-table.webm (662.0 KB) - added by Piotrek Koszuliński 5 years ago.

Download all attachments as: .zip

Change History (11)

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

Description: modified (diff)

comment:2 Changed 5 years ago by Jakub Ś

Status: newpending

I was trying to reproduce this for fair amount of time and nothing happened in CKEditor 4.4. Could you:

  1. Tell me if you are still able to reproduce it?
  2. Should this table be only HTML in editor?
  3. How do you pace caret in table, just with click?
  4. Is there anything you might have missed?

Changed 5 years ago by Piotrek Koszuliński

Attachment: delete-in-table.webm added

comment:3 Changed 5 years ago by Piotrek Koszuliński

Without any additional effort I reproduced in on Chrome. Just copy this HTML to source, switch to wysiwyg, place caret in first cell, press delete and boom.

comment:4 Changed 5 years ago by Piotrek Koszuliński

Hmm... I can't reproduce this on Chrome on Mac. We need to check it on more machines.

comment:5 Changed 5 years ago by Marek Lewandowski

Status: pendingconfirmed

I confirm it in FF, Chrome, Chromium@Win7.

FF thorws:

TypeError: startNode is null

comment:6 Changed 5 years ago by Olek Nowodziński

I'm not able to reproduce it. Tried Chrome on Mac and Win and IE9.

comment:7 Changed 5 years ago by Piotrek Koszuliński

Since Marek reproduced it too, I'll give it a try to see what it may be. I may understand then why only some of us can reproduce it.

comment:8 Changed 5 years ago by Piotrek Koszuliński

Description: modified (diff)

OK, I figured this out. You need to have magicline visible while pressing backspace :D.

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

Summary: Delete pressed in table cell causes an errorDelete pressed in table cell causes an error when magicline is visible

comment:10 in reply to:  8 Changed 5 years ago by Olek Nowodziński

Replying to Reinmar:

OK, I figured this out. You need to have magicline visible while pressing backspace :D.

The problem would be gone if we used lineutils as an engine of magicline (#9400, #10933). I hope, one day, it becomes a reality :)

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy