jQuery detect click on disabled submit button

Found this in this question

Firefox, and perhaps other browsers, disable DOM events on form fields
that are disabled. Any event that starts at the disabled form field is
completely canceled and does not propagate up the DOM tree. Correct me
if I’m wrong, but if you click on the disabled button, the source of
the event is the disabled button and the click event is completely
wiped out. The browser literally doesn’t know the button got clicked,
nor does it pass the click event on. It’s as if you are clicking on a
black hole on the web page.

I’d thought you might be able to ‘fake’ a click by wrapping the button in a div and firing the logic on the div’s click event. But, as indicated above, the events on disabled elements do not seem to be bubbled up the DOM tree.

Leave a Comment