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:
Stuart Colville 2024-09-12 16:01:16 +00:00
Родитель 5122678374
Коммит 6629a64e75
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -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",