witten
/
luminotes
Archived
1
0
Fork 0

Fixed a rare Chrome/Safari bug in which pressing backspace sometimes made the text cursor vanish.

This commit is contained in:
Dan Helfman 2008-12-03 14:50:53 -08:00
parent 6b7ad59001
commit 0b2b0ec69e
3 changed files with 11 additions and 1 deletions

2
NEWS
View File

@ -1,5 +1,7 @@
1.5.9:
* Fixed a Chrome/Safari bug in which ending a link didn't always work.
* Fixed a rare Chrome/Safari bug in which pressing backspace sometimes made
the text cursor vanish.
1.5.8: November 24, 2008
* Fixed a bug that prevented notes from being automatically saved in certain

View File

@ -329,10 +329,14 @@ Editor.prototype.key_released = function ( event ) {
Editor.prototype.cleanup_html = function ( key_code ) {
if ( WEBKIT ) {
// if enter is pressed while in a title, end title mode, since WebKit doesn't do that for us
var ENTER = 13;
var ENTER = 13; BACKSPACE = 8;
if ( key_code == ENTER && this.state_enabled( "h3" ) )
this.exec_command( "h3" );
// if backspace is pressed, skip WebKit style scrubbing since it can cause problems
if ( key_code == BACKSPACE )
return null;
// as of this writing, WebKit doesn't support execCommand( "styleWithCSS" ). for more info, see
// https://bugs.webkit.org/show_bug.cgi?id=13490
// so to make up for this shortcoming, manually scrub WebKit style spans and other nodes,

View File

@ -1073,6 +1073,10 @@ Wiki.prototype.key_pressed = function ( event ) {
if ( code == 78 )
this.create_blank_editor( event );
}
// prevent backspace from going back to the previous page
if ( code == 8 )
event.stop();
}
Wiki.prototype.editor_key_pressed = function ( editor, event ) {