-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clicking on disabled input checkbox modify checked value #120
Comments
Not really, it should behave the same. Is the checkbox properly disabled? |
Yes, the checkbox remain disabled. |
When I try to build my own click event: var event = document.createEvent('MouseEvents');
event.initMouseEvent('click');
var element = document.querySelector('input[type="checkbox"]');
console.log(element.checked, element.disabled); // false true
element.dispatch(event);
console.log(element.checked, element.disabled); // true true I can reproduce the behaviour. |
That is interesting. I don't know why firing a mouse event on a disabled checkbox is different that calling |
Can you only verify that this is not a browser bug by testing it on firefox and safari or edge? If so, this must deserve some special case. |
Interesting, on firefox I can't reproduce the bug and my tests are green. |
More or less what I was expecting. This totally looks like a browser bug to me. What about safari and edge? |
Bug is here on Safari (so webkit) and not here on Edge. |
So we have a Chrome/Safari VS firefox/edge discrepancy in hands. I think we should report it. I think that the firefox/edge behaviour is the correct one. |
I'll see to report that to Webkit. But, do you think it worth to fix it on this repo? |
I think I wouldn't oppose if the fix is reasonably simple and we leave a comment linking to the bug-report, so we can remove the hack once it's fixed. |
I create a component
my-input-component.hbs
:and I add a integration test:
The second
assert.notOk
fails,find('input[type="checkbox"]').checked
returns true.If I replace
click
helper by something like that, it's working:Do you have any idea about why
click
has this behaviour? Thanks.The text was updated successfully, but these errors were encountered: