MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / AppFocusHandler

Function AppFocusHandler

frontend/app/app.tsx:183–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181}
182
183function AppFocusHandler() {
184 return null;
185
186 // for debugging
187 useEffect(() => {
188 document.addEventListener("focusin", appFocusIn);
189 document.addEventListener("focusout", appFocusOut);
190 document.addEventListener("selectionchange", appSelectionChange);
191 const ivId = setInterval(() => {
192 const activeElement = document.activeElement;
193 if (activeElement instanceof HTMLElement) {
194 focusLog("activeElement", getElemAsStr(activeElement));
195 }
196 }, 2000);
197 return () => {
198 document.removeEventListener("focusin", appFocusIn);
199 document.removeEventListener("focusout", appFocusOut);
200 document.removeEventListener("selectionchange", appSelectionChange);
201 clearInterval(ivId);
202 };
203 });
204 return null;
205}
206
207const MacOSFirstClickHandler = () => {
208 useEffect(() => {

Callers

nothing calls this directly

Calls 1

getElemAsStrFunction · 0.90

Tested by

no test coverage detected