From 7a26017a28e0cdddd9c4cf56dfb47e2506583e44 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 10 Aug 2007 19:32:12 +0000 Subject: [PATCH] Update the toolbar state everytime the mouse is clicked in case the cursor has moved. --- static/js/Editor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/Editor.js b/static/js/Editor.js index a7bdf32..1846526 100644 --- a/static/js/Editor.js +++ b/static/js/Editor.js @@ -265,6 +265,9 @@ Editor.prototype.key_released = function ( event ) { } Editor.prototype.mouse_clicked = function ( event ) { + // update the state no matter what, in case the cursor has moved + signal( this, "state_changed", this ); + // we only want to deal with left mouse button clicks if ( event.mouse().button.middle || event.mouse().button.right ) return; @@ -283,7 +286,6 @@ Editor.prototype.mouse_clicked = function ( event ) { return; event.stop(); - signal( this, "state_changed", this ); // in case the link is to ourself, first grab the most recent version of our title this.scrape_title();