Button is still disabled after enabling

Hello guys,

I have a button for my Firefox addon (via Addon SDK), which I disable and enable at some time. This is working fine.
But after some days setting the “disabled” property to false won’t affect the button anymore and it can’t be clicked (so it is still disabled) but all other properties (like label and image) are set correctly.

A reinstall works fine, but after a few days the error occurs again. Same goes for deactivatng and activating it. I tried to setup the extension with a new profile, the error keeps occurring. Debugging didn’t give any further information, the code is executed and the “disabled” property is set to false, but it is still disabled in the toolbar.

Do you have any advice? Any tips to get more information about this error?

Greetings

I used to run into similar problems (long ago), and the solution I found is that instead of setting disabled to false, it’s more effective to remove the disabled attribute altogether. That is, if you’re setting it via DOM functions rather than JS properties.

1 Like