diff --git a/NEWS b/NEWS index 75a775a..f057058 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,12 @@ +1.4.12: July ??, 2008: + * Fixed bug in which tab/shift-tab for indending/outdenting nested lists no + longer worked, and in the process made it work in IE as well (which it + never has). + * controller.Root.guide() now accepts an optional note_id parameter. + 1.4.11: June 29, 2008: * Fixed bug in which bolding of suggest-as-you-type search text was case sensitive. Now it's case insensitive. - * controller.Root.guide() now accepts an optional note_id parameter. 1.4.10: June 29, 2008: * New suggest-as-you-type feature for creating a new link, setting a link's diff --git a/static/js/Wiki.js b/static/js/Wiki.js index e67250f..a4403e7 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -992,12 +992,18 @@ Wiki.prototype.editor_key_pressed = function ( editor, event ) { } else if ( code == 68 ) { this.delete_editor( event ); } - // IE: hitting space or tab while making a link shouldn't end the link - } else if ( ( code == 32 || code == 9 ) && editor.document.selection && editor.state_enabled( "a" ) ) { - if ( code == 32 ) { - var range = editor.document.selection.createRange(); - range.text = " "; - } + // shift-tab: outdent + } else if ( event.modifier().shift && code == 9 ) { + editor.exec_command( "outdent" ); + event.stop(); + // tab: outdent + } else if ( code == 9 ) { + editor.exec_command( "indent" ); + event.stop(); + // IE: hitting space while making a link shouldn't end the link + } else if ( code == 32 && editor.document.selection && editor.state_enabled( "a" ) ) { + var range = editor.document.selection.createRange(); + range.text = " "; event.stop(); // IE: hitting backspace while making a link shouldn't end the link } else if ( code == 8 && editor.document.selection ) {