MediaWiki:Common.js: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 700: | Строка 700: | ||
switchCategory(categoryIndex); | switchCategory(categoryIndex); | ||
switchContent(targetMenuItem); | switchContent(targetMenuItem); | ||
targetMenuItem.scrollIntoView(); // Прокручиваем к пункту | targetMenuItem.scrollIntoView({ behavior: "smooth" }); // Прокручиваем к пункту | ||
} | } | ||
} else { | } else { | ||
| Строка 709: | Строка 709: | ||
if (categoryIndex !== -1) { | if (categoryIndex !== -1) { | ||
switchCategory(categoryIndex); | switchCategory(categoryIndex); | ||
targetCategory.scrollIntoView(); | targetCategory.scrollIntoView({ behavior: "smooth" }); | ||
} | } | ||
} | } | ||