43
Views
2
Comments
Solved
How to enable added EventListeners on an input even when disabled
Question

I have added a 'click' event listener to an input, and when that input is enabled the event listener runs as expected. However, when that input is disabled, the event listener does not run as per usual. I removed the CSS disabling the pointer events from the input (that is applied by OutSystems when an Input is disabled) but it still did not resolve the issue. I thought perhaps they add their own event listener that blocks all others but am not sure how to know for sure.


How does OutSystems prevent these added EventListsners from running and what can I do about it while causing minimal damage - I don't want to get rid of anything more than necessary that OutSystems has put in intentionally to stop issues/improve user experience by disabling the events...

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

Hi Nicolas,

Disabled elements don't fire events. Most browsers will propagate an event originating from the disabled element up the DOM tree. This has nothing to do with OutSystems.

Regards,

Daniel

2022-11-02 07-18-33
Nicholas Campbell

Thanks Daniel. So I will have to get creative then and possibly put it on the div above.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.