We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47cc730 commit 7d2da53Copy full SHA for 7d2da53
src/main/js/util/keyboard.js
@@ -82,20 +82,10 @@ export default function makeKeyboardNavigable(
82
83
function scrollAndSelect(selectedItem, selectedClass, items) {
84
if (selectedItem) {
85
- selectedItem.scrollIntoView({ block: 'center', behavior: 'smooth' });
+ selectedItem.scrollIntoView({ block: "center", behavior: "smooth" });
86
selectedItem.classList.add(selectedClass);
87
if (items.includes(document.activeElement)) {
88
selectedItem.focus();
89
}
90
91
92
-
93
-function isInViewport(element) {
94
- const rect = element.getBoundingClientRect();
95
- return (
96
- rect.top >= 0 &&
97
- rect.left >= 0 &&
98
- rect.bottom <= window.innerHeight &&
99
- rect.right <= window.innerWidth
100
- );
101
-}
0 commit comments