disable click

altrue990

09-02-2019

I have a button that should only be clicked once. Once it is clicked, it needs to be disabled (i.e. click event should not be fireable). I have JavaScript that I thought accomplished this:

this.access = "readOnly";

But it appears this only disables the ability to "click" using the mouse. The button is still focusable and enter causes the click event to fire.

View Entire Topic

MinusZero

10-02-2019

Hi,

Instead of readOnly use protected. This will disable all functions of the button and also exclude it from being focussed on when using the TAB key.

this.access = "protected";