mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-18 00:23:51 -05:00
Port 8d6aea33260dedeacb3d22ac1a6d2f9cc3856a5e to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
11 lines
258 B
JavaScript
11 lines
258 B
JavaScript
// Package imports.
|
|
import { supportsPassiveEvents } from 'detect-passive-events';
|
|
|
|
// Focuses the root element.
|
|
export function focusRoot () {
|
|
let e;
|
|
if (document && (e = document.querySelector('.ui')) && (e = e.parentElement)) {
|
|
e.focus();
|
|
}
|
|
}
|