Opened 13 years ago

Last modified 12 years ago

#8209 confirmed Bug

[Firefox5] : Unable to write in the same line ,After using display none/block on editor.

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone:
Component: General Version: 3.3.1
Keywords: Firefox5 Cc:

Description

  1. Place 1111.html file in samples folder.
  2. Open file in a browser
  3. Click inside editor and start typing (type two words, you have got 5 seconds:))
  4. After editor reappears, cursor appears at the beginning of typed text but If start typing without changing cursor location old text jumps one line down, so that you have two lines of text in two paragraphs.

This issue has been reproducible in Firefox5 from CKE 3.3.1

Attachments (1)

1111.html (1.2 KB) - added by Jakub Ś 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by Jakub Ś

Attachment: 1111.html added

comment:1 Changed 13 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 13 years ago by Jakub Ś

This issue is related to #5842

comment:3 Changed 12 years ago by Jakub Ś

A workaround to this particular bug brought by @garry.yao. Below is the modified code for 1111.html

var editor = CKEDITOR.appendTo( 'editor1' );
	setTimeout( function()
	{
		var sel = editor.getSelection();
		sel && sel.lock();
		document.getElementById( 'editor1' ).style.display = 'none';
		setTimeout( function()
			{
			document.getElementById( 'editor1' ).style.display = 'block';
			editor.getSelection().unlock( true );
		}, 1000 );
	}, 5000 );

comment:4 Changed 12 years ago by Jakub Ś

Second workaround. This one handles both #5842 and #8209. It was brought to you by @garry.yao. Below is the modified code for 1111.html

var editor = CKEDITOR.appendTo( 'editor1' );
setTimeout( function()
{
	var focused = editor.focusManager.hasFocus;
	if ( focused )
	{
		var sel = editor.getSelection();
		sel.lock();
	}

	document.getElementById( 'editor1' ).style.display = 'none';
	setTimeout( function()
	{
		document.getElementById( 'editor1' ).style.display = 'block';

		if ( focused )
		{
			editor.focusGrabber.focus();
			setTimeout( function() { editor.getSelection().unlock( true ); } );
		}
	}, 1000 );
}, 5000 );
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