diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 7244173..2664ab6 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -1004,7 +1004,7 @@ Wiki.prototype.editor_key_pressed = function ( editor, event ) { } 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 ) + if ( link && link.pulldown && link.pulldown.visible && link.pulldown.visible() ) return; editor.exec_command( "outdent" ); @@ -1013,7 +1013,7 @@ Wiki.prototype.editor_key_pressed = function ( editor, event ) { } 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 ) + if ( link && link.pulldown && link.pulldown.visible && link.pulldown.visible() ) return; editor.exec_command( "indent" ); @@ -3651,6 +3651,10 @@ Suggest_pulldown.prototype.something_selected = function () { return false; } +Suggest_pulldown.prototype.visible = function () { + return !hasElementClass( this.div, "invisible" ); +} + Suggest_pulldown.prototype.shutdown = function () { Pulldown.prototype.shutdown.call( this );