witten
/
luminotes
Archived
1
0
Fork 0

Fixed a bug in which pressing tab/shift-tab when a suggest pulldown was open caused the current text to indent/outdent.

Now, tab/shift-tab only cause indent/outdent when there is no suggest pulldown.
This commit is contained in:
Dan Helfman 2008-07-12 14:24:00 -07:00
parent 1940929090
commit 7e519a202f
2 changed files with 15 additions and 0 deletions

4
NEWS
View File

@ -1,3 +1,7 @@
1.4.14: July 12, 2008:
* Fixed a bug in which pressing tab/shift-tab when a suggest pulldown was
open caused the current text to indent/outdent.
1.4.13: July 11, 2008:
* New "revert" button to roll back a note's contents to an earlier revision.

View File

@ -962,6 +962,7 @@ Wiki.prototype.key_pressed = function ( event ) {
Wiki.prototype.editor_key_pressed = function ( editor, event ) {
var code = event.key().code;
if ( event.modifier().ctrl ) {
// ctrl-backtick: alert with frame HTML contents (temporary for debugging)
if ( code == 192 || code == 96 ) {
@ -1001,10 +1002,20 @@ Wiki.prototype.editor_key_pressed = function ( editor, event ) {
}
// shift-tab: outdent
} else if ( event.modifier().shift && code == 9 ) {
// ignore shift-tab here if a Suggest_pulldown is open
var link = editor.find_link_at_cursor();
if ( link && link.pulldown && link.pulldown.update_suggestions )
return;
editor.exec_command( "outdent" );
event.stop();
// tab: outdent
} else if ( code == 9 ) {
// ignore tab here if a Suggest_pulldown is open
var link = editor.find_link_at_cursor();
if ( link && link.pulldown && link.pulldown.update_suggestions )
return;
editor.exec_command( "indent" );
event.stop();
// IE: hitting space while making a link shouldn't end the link