diff --git a/cards/card_component.js b/cards/card_component.js index 05c278ce0..78a1a01b0 100644 --- a/cards/card_component.js +++ b/cards/card_component.js @@ -26,11 +26,11 @@ BaseCard["{{componentName}}"] = class extends ANSWERS.Component { }) ); } - - const rtfElement = DOM.query(this._container, '.js-yxt-rtfValue'); + + const rtfElement = this._container.querySelector('.js-yxt-rtfValue'); if (rtfElement) { const fieldName = rtfElement.dataset.fieldName; - DOM.on(rtfElement, 'click', e => this._handleRtfClickAnalytics(e, fieldName)); + rtfElement.addEventListener('click', e => this._handleRtfClickAnalytics(e, fieldName)); } }