You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First thank you for this great component that I use in many projects.
In the current project I work on this button is used in a form.
I control this button mainly via methods (using <ProgressButton> ref) like success() or error().
However I am also using the state prop which I set to "disabled" until all the form fields are valid, therefore I set the controlled prop to true.
When I do this, when the button is in disabled state the click on the inside of <ProgressButton> (underlying span element ("Go !" text)) goes through, even if the cursor correctly shows disabled icon. Clicks within button but outside "Go !" text are correctly blocked.
If I unset the controlled prop all the clicks are correctly blocked in disabled state.
I can provide an example in codesandbox if you want.
edit : I edited the issue as it seems only the click on underlying span element ("Go !" text) goes through (no click event received if clicking left or right part of the button), but I will try to reproduce an example on codesandbox because that might be a CSS issue on my side as I tweaked the pointer-events property in the form, will check that.
The text was updated successfully, but these errors were encountered:
capi1O
changed the title
intial click allowed when state="disabled" if controlled
click allowed on button text when state="disabled" if controlled
Apr 20, 2019
Alright I will do it this week-end ! In the meantime could you accept PR #91 (so it is easier on my side because I can start straight away from my last branch) ?
First thank you for this great component that I use in many projects.
In the current project I work on this button is used in a form.
I control this button mainly via methods (using
<ProgressButton>
ref) likesuccess()
orerror()
.However I am also using the
state
prop which I set to"disabled"
until all the form fields are valid, therefore I set thecontrolled
prop totrue
.When I do this, when the button is in disabled state the click on the inside of
<ProgressButton>
(underlying span element ("Go !" text)) goes through, even if the cursor correctly shows disabled icon. Clicks within button but outside "Go !" text are correctly blocked.If I unset the
controlled
prop all the clicks are correctly blocked in disabled state.I can provide an example in codesandbox if you want.
edit : I edited the issue as it seems only the click on underlying span element ("Go !" text) goes through (no click event received if clicking left or right part of the button), but I will try to reproduce an example on codesandbox because that might be a CSS issue on my side as I tweaked the
pointer-events
property in the form, will check that.The text was updated successfully, but these errors were encountered: