changeset 3:2f424bef178f

The 'about:news' text in the url bar is selected whenever a new tab is opened, so that just creating a new tab and typing stuff always does what it used to do (habituation isn't broken).
author Atul Varma <varmaa@toolness.com>
date Thu, 21 Aug 2008 17:29:51 -0700
parents 88b12596346d
children f4b6208eadd5
files ambnews/content/ambnews.js
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ambnews/content/ambnews.js	Thu Aug 21 17:00:35 2008 -0700
+++ b/ambnews/content/ambnews.js	Thu Aug 21 17:29:51 2008 -0700
@@ -97,6 +97,9 @@
     if (aEvent.target.baseURI == "about:blank") {
       var doc = aEvent.target;
       doc.defaultView.location = "about:news";
+      // TODO: The 10ms delay here *seems* to work all the time,
+      // but its effectiveness could actually be a race condition.
+      window.setTimeout(function() { gURLBar.select(); }, 10);
     }
   }
 };