зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1917563 - fix focus in sidebar history when history data is pending r=sidebar-reviewers,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D221530
This commit is contained in:
Родитель
5122678374
Коммит
6629a64e75
|
@ -93,7 +93,10 @@ export class SidebarHistory extends SidebarPage {
|
|||
* The template to use for cards-container.
|
||||
*/
|
||||
get cardsTemplate() {
|
||||
if (this.controller.searchResults) {
|
||||
if (this.controller.isHistoryPending) {
|
||||
// don't render cards until initial history visits entries are available
|
||||
return "";
|
||||
} else if (this.controller.searchResults) {
|
||||
return this.#searchResultsTemplate();
|
||||
} else if (!this.controller.isHistoryEmpty) {
|
||||
return this.#historyCardsTemplate();
|
||||
|
@ -230,11 +233,6 @@ export class SidebarHistory extends SidebarPage {
|
|||
this._menu.openPopup(e.target, menuPos, 0, 0, false, false, e);
|
||||
}
|
||||
|
||||
shouldUpdate() {
|
||||
// don't update/render until initial history visits entries are available
|
||||
return !this.controller.isHistoryPending;
|
||||
}
|
||||
|
||||
willUpdate() {
|
||||
this._menuSortByDate.setAttribute(
|
||||
"checked",
|
||||
|
|
Загрузка…
Ссылка в новой задаче