diff --git a/NEWS b/NEWS index 79c4a4c..634e16e 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,7 @@ 1.5.9: + * When you hover the mouse over a link and a link pulldown appears, that + pulldown will now automatically disappear soon after you move the mouse + away. * Changed the "new note" key from ctrl-N to ctrl-M so as not to conflict with the "new browser window" key used in most web browsers. * Fixed a Chrome/Safari bug in which ending a link didn't always work. diff --git a/static/js/Wiki.js b/static/js/Wiki.js index ad967bc..f2e8998 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -2975,11 +2975,15 @@ function Pulldown( wiki, notebook_id, pulldown_id, anchor, relative_to, ephemera if ( this.ephemeral ) { // when the mouse cursor is moved into the pulldown, it becomes non-ephemeral (in other words, - // it will no longer disappear in a few seconds) + // it will no longer disappear in a few seconds). but as soon as the mouse leaves, it becomes + // ephemeral again var self = this; connect( this.div, "onmouseover", function ( event ) { self.ephemeral = false; } ); + connect( this.div, "onmouseout", function ( event ) { + self.ephemeral = true; + } ); } } @@ -3306,10 +3310,16 @@ Link_pulldown.prototype.display_summary = function ( title, summary ) { } Link_pulldown.prototype.title_field_clicked = function ( event ) { + disconnectAll( this.div ); + this.ephemeral = false; + event.stop(); } Link_pulldown.prototype.title_field_focused = function ( event ) { + disconnectAll( this.div ); + this.ephemeral = false; + this.title_field.select(); }