From 3809ad14fbce2d45949b3f14955f78bfc5e73758 Mon Sep 17 00:00:00 2001 From: "blakeross%telocity.com" Date: Mon, 25 Dec 2000 23:57:57 +0000 Subject: [PATCH] Fixing a minor problem with the last patch I checked in. r=timeless --- xpfe/browser/resources/content/openLocation.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/xpfe/browser/resources/content/openLocation.js b/xpfe/browser/resources/content/openLocation.js index d62c954886a..92becd27de9 100644 --- a/xpfe/browser/resources/content/openLocation.js +++ b/xpfe/browser/resources/content/openLocation.js @@ -60,17 +60,11 @@ function onLoad() doSetOKCancel(open, 0, 0, 0); + dialog.input.focus(); if (pref) { - try { - dialog.input.value = pref.CopyUnicharPref("general.open_location.last_url"); - // Select contents of input field - // XXX should probably be done automatically - dialog.input.select(); - } catch (ex) { - // the pref was probably empty - // give up and just set focus to the field - dialog.input.focus(); - } + dialog.input.value = pref.CopyUnicharPref("general.open_location.last_url"); + if (dialog.input.value) + dialog.input.select(); // XXX should probably be done automatically } doEnabling();