MCPcopy Index your code
hub / github.com/zxlie/FeHelper / _isEditableShortcutTarget

Function _isEditableShortcutTarget

apps/json-format/format-lib.js:141–149  ·  view source on GitHub ↗
(target)

Source from the content-addressed store, hash-verified

139 };
140
141 let _isEditableShortcutTarget = function (target) {
142 if (!target || target === document || target === window) return false;
143 let el = target.nodeType === 1 ? target : target.parentElement;
144 if (!el) return false;
145 if (el.isContentEditable) return true;
146 let tagName = (el.tagName || '').toLowerCase();
147 if (/^(input|textarea|select)$/i.test(tagName)) return true;
148 return !!(el.closest && el.closest('input, textarea, select, [contenteditable="true"], .CodeMirror, .cm-editor, .cm-content'));
149 };
150
151 let _updatePlainJsonControls = function () {
152 let optionBar = $('#optionBar');

Callers 1

_bindPrettyJsonShortcutsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected