Mercurial > ambnews-firefox
changeset 4:f4b6208eadd5
Increased delay to select URL bar text.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Thu, 21 Aug 2008 17:38:42 -0700 |
parents | 2f424bef178f |
children | 8cafc4c42c29 |
files | ambnews/content/ambnews.js |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ambnews/content/ambnews.js Thu Aug 21 17:29:51 2008 -0700 +++ b/ambnews/content/ambnews.js Thu Aug 21 17:38:42 2008 -0700 @@ -97,9 +97,11 @@ 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); + // TODO: The delay here only works most of the time; + // its effectiveness is a race condition and we should + // figure out what even to listen for to actually select + // the URL bar text consistently + window.setTimeout(function() { gURLBar.select(); }, 50); } } };