MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / shouldIgnoreEditorShortcutTarget

Function shouldIgnoreEditorShortcutTarget

src/handlers/keyboard.js:91–101  ·  view source on GitHub ↗

* Returns true when a keyboard event target should keep the shortcut local * instead of forwarding it into the editor. * @param {EventTarget | null} target * @returns {boolean}

(target)

Source from the content-addressed store, hash-verified

89 * @returns {boolean}
90 */
91function shouldIgnoreEditorShortcutTarget(target) {
92 if (!(target instanceof Element)) return false;
93
94 return (
95 target instanceof HTMLInputElement ||
96 target instanceof HTMLTextAreaElement ||
97 target instanceof HTMLSelectElement ||
98 target.isContentEditable ||
99 !!target.closest(".prompt, #palette")
100 );
101}
102
103document.addEventListener("deviceready", () => {
104 document.addEventListener("admob.banner.size", async (event) => {

Callers 1

keyboardHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected