Fix focus not focusing into the status page

This commit is contained in:
Lim Chee Aun 2023-03-10 16:49:16 +08:00
parent f15b859971
commit b12b96b8e1

View file

@ -151,6 +151,8 @@ function App() {
// Focus first column // Focus first column
columns.querySelector('.deck-container')?.focus?.(); columns.querySelector('.deck-container')?.focus?.();
} else { } else {
const backDrop = document.querySelector('.deck-backdrop');
if (backDrop) return;
// Focus last deck // Focus last deck
const pages = document.querySelectorAll('.deck-container'); const pages = document.querySelectorAll('.deck-container');
const page = pages[pages.length - 1]; // last one const page = pages[pages.length - 1]; // last one