зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1861527 - On change of category, scroll to the top of the page r=fxview-reviewers,kcochrane
- added `window.scrollTo(0, 0)` to `change-category` event listener callback Differential Revision: https://phabricator.services.mozilla.com/D193969
This commit is contained in:
Родитель
9e2a6ac2b2
Коммит
24f6d90750
|
@ -54,6 +54,7 @@ window.addEventListener("DOMContentLoaded", async () => {
|
|||
window.addEventListener("hashchange", onHashChange);
|
||||
window.addEventListener("change-category", function (event) {
|
||||
location.hash = event.target.getAttribute("name");
|
||||
window.scrollTo(0, 0);
|
||||
recordNavigationTelemetry("category-navigation", event.target);
|
||||
});
|
||||
window.addEventListener("card-container-view-all", function (event) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче