Opened 11 years ago
Last modified 10 years ago
#11491 confirmed Bug
Pressing delete key in highlighted text in blockquote removes paragraph tags
Reported by: | Packs | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Editable | Version: | 3.0 |
Keywords: | Firefox IE | Cc: |
Description
If you create a blockquote, enter some text, highlight the text and then press the Delete key. The paragraph(s) inside the blockquote disappear and you can type directly into it.
For FF you need more than one line of text highlighted.
Attachments (1)
Change History (6)
comment:1 Changed 11 years ago by
Keywords: | Firefox added; Blockquote removed |
---|---|
Status: | new → confirmed |
Version: | 4.3.2 → 3.0 |
Changed 11 years ago by
comment:2 Changed 11 years ago by
With IE8, you need to have a paragraph below the blockquote, and select the contents left to right, e.g. with SHIFT+END
comment:3 Changed 11 years ago by
Keywords: | IE added |
---|
@Packs you are right, with your TC this problem can be reproduced in IE8-10. IE 11 seems to work fine here.
comment:4 Changed 10 years ago by
Hello guys, is there any solution to prevent paragraph tags being removed after removing all editable content? (FF issue at least as I remember)
comment:5 Changed 10 years ago by
No one is working on this ticket at the moment and I can't see any way to bring back the paragraph. Sorry.
Try below. Perhaps that code or something like that might work:
editor.on( "pluginsLoaded", function( event ){ editor.on( 'contentDom', function() { var editable = editor.editable(); editable.attachListener( editable, 'keyup', function( e ) { if( e.data.getKeystroke() == 46 ) { var elem = editor.elementPath().lastElement; if( elem.getName() == 'blockquote' ) { var emptyP = new CKEDITOR.dom.element( 'p' ); emptyP.appendBogus(); emptyP.appendTo( elem ); var range = editor.createRange(); range.moveToPosition( emptyP, CKEDITOR.POSITION_AFTER_START ); editor.getSelection().selectRanges( [ range ] ); } } }, null, null, 100 ); }); });
I was able to reproduce this problem only in Firefox from CKEditor 3.0.
I wasn't able however to reproduce it in any other browser.
@Packs if this is reproducible in other browsers please provide screen-cast and/or step by step scenario allowing reproducing this problem in CKEditor demo page.