Open History to see the last commit
1export function isTerminalFocused(): boolean {
2 const activeElement = document.activeElement;
3 if (!(activeElement instanceof HTMLElement)) return false;
4 if (activeElement.classList.contains("xterm-helper-textarea")) return true;
5 return activeElement.closest(".thread-terminal-drawer .xterm") !== null;
6}