From 5aaf0d627623657b4bd7ddf9554d87895f648645 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Wed, 5 Sep 2007 23:11:19 +0000 Subject: [PATCH] Reverting to earlier behavior: Options pulldown doesn't close if you click a checkbox. --- static/js/Wiki.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 2715ef5..6138d69 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -14,7 +14,7 @@ function Wiki() { connect( this.invoker, "error_message", this, "display_error" ); connect( "search_form", "onsubmit", this, "search" ); connect( "search_button", "onclick", this, "toggle_search_options" ); - connect( "html", "onclick", this, "clear_pulldowns" ); + connect( "html", "onclick", this, "background_clicked" ); // get info on the requested notebook (if any) var self = this; @@ -210,6 +210,11 @@ Wiki.prototype.populate = function ( result ) { this.display_empty_message(); } +Wiki.prototype.background_clicked = function ( event ) { + if ( !hasElementClass( event.target(), "pulldown_checkbox" ) ) + this.clear_pulldowns(); +} + Wiki.prototype.create_blank_editor = function ( event ) { if ( event ) event.stop();