Bug 402501, add bookmark panel not focused, use popupshown handler instead of timeout, r=mano

This commit is contained in:
enndeakin@sympatico.ca 2007-11-17 05:28:16 -08:00
parent 4ee5c082bb
commit 1fd782ab70
2 changed files with 9 additions and 6 deletions

View File

@ -150,11 +150,13 @@ var PlacesCommandHook = {
gEditItemOverlay.initPanel(aItemId,
{ hiddenRows: ["description", "location",
"loadInSidebar", "keyword"] });
setTimeout(function() {
var namePicker = document.getElementById("editBMPanel_namePicker");
namePicker.focus();
namePicker.editor.selectAll();
}, 0);
},
editBookmarkPanelShown:
function PCH__doShowEditBookmarkPanel() {
var namePicker = document.getElementById("editBMPanel_namePicker");
namePicker.focus();
namePicker.editor.selectAll();
},
/**

View File

@ -101,7 +101,8 @@
<panel type="autocomplete" chromedir="&locale.dir;" id="PopupAutoComplete" noautofocus="true" hidden="true"/>
<panel id="editBookmarkPanel" orient="vertical" hidden="true">
<panel id="editBookmarkPanel" orient="vertical" hidden="true"
onpopupshown="PlacesCommandHook.editBookmarkPanelShown();">
<vbox id="editBookmarkPanelContent" flex="1"/>
<hbox flex="1">
<spacer flex="1"/>