I'm having a problem with this component on the load of the page. It seems the component stopped working and now I always receive a "Cannot read properties of null (reading 'removeEventListener') "
Hello Patricia,
Can you please paste sample java script code where you might be invoking this removeEventListener method.
Otherwise please check this way. It might be possible either name of element is wrong since it is not able to find element itself.
quick way to check this
const element = document.getElementById('mytrialElement');
if (element) {
element.removeEventListener('click', myHandlerFunction);
}
The component tries to clean up/remove event listeners on an element (input) that isn't found yet (document.getElementById() returns null) — often due to:
As suggested by Gaurav above, It should work.