@atlaskit/popup
Version:
A popup displays brief content in an overlay.
16 lines (15 loc) • 507 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isInteractiveElement = void 0;
var interactiveTags = ['button', 'a', 'input', 'select', 'textarea'];
var isInteractiveElement = exports.isInteractiveElement = function isInteractiveElement(element) {
if (interactiveTags.includes(element.tagName.toLowerCase())) {
return true;
}
if (element.getAttribute('tabindex') !== null || element.hasAttribute('contenteditable')) {
return true;
}
return false;
};