Materialize: disabled property on buttons

Created on 3 May 2016  路  10Comments  路  Source: Dogfalo/materialize

Hi developers, yesterday upgrade to the latest version of MaterializeCSS. But now I see that the property does not work in those disabled buttons, not if the update change something and not know, attached images of before and after.
1
2

bug

Most helpful comment

Not sure if chrome recently changed anything but technically speaking, by standards the disabled property should only be used on input buttons. But because it used to work, i've added it as a supported attribute in c34a92f

All 10 comments

I also faced the same, if we click the disabled button, it does the click action (which it should not do)

For the time being am using jquery disabled property

@merlano17 how do you do it?

@INGCRENGIFO you can use some simple jquery in the meantime to stop this from happening.

something like this in doc ready:

$('a.disabled').click(() => event.preventDefault()));

or even more strongly, returning false.

@INGCRENGIFO
$(element).prop('disabled','disabled');

And to enable it use $(element).prop('disabled',false);

screen shot 2016-05-13 at 9 17 14 pm
Not sure if this has to do with the issue, but here in the sass source files you can see that pointer-events still occur on the buttons themselves (only the children get disabled with the * selector). This causes the issue of a button being disabled yet the link or onclick event still activating onclick

As for the disabled styles I'm not sure as to why that doesnt work..

Not sure if chrome recently changed anything but technically speaking, by standards the disabled property should only be used on input buttons. But because it used to work, i've added it as a supported attribute in c34a92f

@acburst Hello, how you could apply the change that you went? materialize remains in the version 0.97.6

You can either download the latest code from github or wait until we release next.
Or copy the code merged in and use it in your own code for the meantime

let me see if I understand, if I download what is on the main page of git, that's the version you modified your ?? which has the bug fixed?
git

@acburst and knew how to download and update, everything was solved. Thank you so much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lpgeiger picture lpgeiger  路  3Comments

ruslandzhumaev picture ruslandzhumaev  路  3Comments

samybob1 picture samybob1  路  3Comments

acierpinski picture acierpinski  路  3Comments

hartwork picture hartwork  路  3Comments