rem: try { dialog.input.value = pref.CopyUnicharPref("general.open_location.last_url");   dialog.input.select(); } catch (ex) {   dialog.input.focus(); } 
add: dialog.input.value = pref.CopyUnicharPref("general.open_location.last_url"); if (dialog.input.value) dialog.input.select(); 
context: function onLoad() {  bundle = srGetStrBundle("chrome://navigator/locale/openLocation.properties");    dialog                = new Object;  dialog.input          = document.getElementById("dialog.input");  dialog.help           = document.getElementById("dialog.help");  dialog.open           = document.getElementById("ok");  dialog.openAppList    = document.getElementById("openAppList");  dialog.openTopWindow  = document.getElementById("currentWindow");  dialog.openEditWindow = document.getElementById("editWindow");    browser = window.arguments[0];  if (!browser) {    // No browser supplied - we are calling from Composer    dialog.openAppList.selectedItem = dialog.openEditWindow;    dialog.openTopWindow.setAttribute("disabled", "true");  }   else {    dialog.openAppList.selectedItem = dialog.openTopWindow;  }    // change OK button text to 'open'  dialog.open.setAttribute("value", bundle.GetStringFromName("openButtonLabel"));  doSetOKCancel(open, 0, 0, 0);    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();    }  }    doEnabling();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/3809ad14fbce2d45949b3f14955f78bfc5e73758/openLocation.js/buggy/xpfe/browser/resources/content/openLocation.js