Opened 14 years ago
Last modified 13 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
- Place 1111.html file in samples folder.
- Open file in a browser
- Click inside editor and start typing (type two words, you have got 5 seconds:))
- 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)
Change History (5)
Changed 14 years ago by
comment:1 Changed 14 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 14 years ago by
comment:3 Changed 13 years ago by
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 13 years ago by
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 );
This issue is related to #5842