in src/helpers/focusManager.js [56:73]
export function returnFocus(preventScroll = false) {
let toFocus = null;
try {
if (focusLaterElements.length !== 0) {
toFocus = focusLaterElements.pop();
toFocus.focus({ preventScroll });
}
return;
} catch (e) {
console.warn(
[
"You tried to return focus to",
toFocus,
"but it is not in the DOM anymore"
].join(" ")
);
}
}