@atlaskit/renderer
Version:
Renderer component
25 lines (24 loc) • 765 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isInteractiveElement = isInteractiveElement;
var _classnames = require("@atlaskit/media-card/classnames");
var _classnames2 = require("@atlaskit/media-viewer/classnames");
/**
* Check if an element is interactive (or otherwise if clicking on it shouldn't transition the
* renderer to the editor in somewhere like the Jira description
* @param element
*/
function isInteractiveElement(element) {
if ('href' in element && element.href != null) {
return true;
}
if (element.classList.contains(_classnames2.mediaViewerPopupClass)) {
return true;
}
if (element.classList.contains(_classnames.fileCardImageViewSelector)) {
return true;
}
return false;
}