MCPcopy
hub / github.com/bevacqua/dragula / isEditable

Function isEditable

dragula.js:568–573  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

566function getParent (el) { return el.parentNode === doc ? null : el.parentNode; }
567function isInput (el) { return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable(el); }
568function isEditable (el) {
569 if (!el) { return false; } // no parents were editable
570 if (el.contentEditable === 'false') { return false; } // stop the lookup
571 if (el.contentEditable === 'true') { return true; } // found a contentEditable element in the chain
572 return isEditable(getParent(el)); // contentEditable is set to 'inherit'
573}
574
575function nextEl (el) {
576 return el.nextElementSibling || manually();

Callers 1

isInputFunction · 0.85

Calls 1

getParentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…