mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1364911
- Wait for the history subview to be populated before opening it. r=Gijs
MozReview-Commit-ID: 7F1zPhYjVnL --HG-- extra : rebase_source : fb175b80ec45dc2a1f901403bd8aa5cc2b4ffd69 extra : source : 9c81323fba749d1a209c1e5ee34b5705ec2418cc
This commit is contained in:
parent
1f7b56a7b8
commit
132e133c40
@ -176,6 +176,7 @@ const CustomizableWidgets = [
|
||||
tooltiptext: "history-panelmenu.tooltiptext2",
|
||||
defaultArea: CustomizableUI.AREA_PANEL,
|
||||
onViewShowing(aEvent) {
|
||||
aEvent.detail.addBlocker(new Promise((resolve, reject) => {
|
||||
// Populate our list of history
|
||||
const kMaxResults = 15;
|
||||
let doc = aEvent.target.ownerDocument;
|
||||
@ -232,9 +233,11 @@ const CustomizableWidgets = [
|
||||
},
|
||||
handleError(aError) {
|
||||
log.debug("History view tried to show but had an error: " + aError);
|
||||
reject();
|
||||
},
|
||||
handleCompletion(aReason) {
|
||||
log.debug("History view is being shown!");
|
||||
resolve();
|
||||
},
|
||||
});
|
||||
|
||||
@ -272,6 +275,7 @@ const CustomizableWidgets = [
|
||||
element.classList.add("subviewbutton", "cui-withicon");
|
||||
}
|
||||
recentlyClosedWindows.appendChild(windowsFragment);
|
||||
}));
|
||||
},
|
||||
onCreated(aNode) {
|
||||
// Middle clicking recently closed items won't close the panel - cope:
|
||||
|
Loading…
Reference in New Issue
Block a user