witten
/
luminotes
Archived
1
0
Fork 0

Link pulldowns opened via mouse hovering will now disappear when the mouse is moved away.

This commit is contained in:
Dan Helfman 2008-12-03 15:42:08 -08:00
parent 929d27035a
commit 033833b00b
2 changed files with 14 additions and 1 deletions

3
NEWS
View File

@ -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.

View File

@ -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();
}