File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ CKEditor 4 Changelog
4
4
## CKEditor 4.1.2
5
5
6
6
* [ #10389 ] ( http://dev.ckeditor.com/ticket/10389 ) : Invalid closing tag </tr > in a sample "Text and Table" template.
7
+ * [ #9761 ] ( http://dev.ckeditor.com/ticket/9761 ) : Update BACKSPACE key state in blockedKeystrokes when using editor.setReadOnly().
7
8
8
9
## CKEditor 4.1.1
9
10
Original file line number Diff line number Diff line change 432
432
433
433
// Setup editor keystroke handlers on this element.
434
434
var keystrokeHandler = editor . keystrokeHandler ;
435
- keystrokeHandler . blockedKeystrokes [ 8 ] = editor . readOnly ;
435
+
436
+ // If editor is read-only, then make sure that BACKSPACE key
437
+ // is blocked to prevent browser history navigation.
438
+ keystrokeHandler . blockedKeystrokes [ 8 ] = + editor . readOnly ;
439
+
436
440
editor . keystrokeHandler . attach ( this ) ;
437
441
438
442
// Update focus states.
Original file line number Diff line number Diff line change 840
840
if ( this . readOnly != isReadOnly ) {
841
841
this . readOnly = isReadOnly ;
842
842
843
+ // Block or release BACKSPACE key according to current read-only
844
+ // state to prevent browser's history navigation (#9761).
845
+ this . keystrokeHandler . blockedKeystrokes [ 8 ] = + isReadOnly ;
846
+
843
847
this . editable ( ) . setReadOnly ( isReadOnly ) ;
844
848
845
849
// Fire the readOnly event so the editor features can update
You can’t perform that action at this time.
0 commit comments