We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
isElementOrAncestorDisabled
I believe there may be a bug in isElementOrAncestorDisabled: https://github.com/testing-library/jest-dom/blob/918b6fbcde10d4409ee8f05c6e4eecbe96a72b7a/src/to-be-disabled.js#L64C10-L64C37
and the function should be written like this instead:
function isElementOrAncestorDisabled(element) { return ( canElementBeDisabled(element) && (isElementDisabled(element) || (!element.hasAttribute('disabled') && isAncestorDisabled(element))) ) }
From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled If this attribute is not specified, the control inherits its setting from the containing element
Before checking the parent, the function should be checking that the attribute is not specified on the element.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I believe there may be a bug in
isElementOrAncestorDisabled
:https://github.com/testing-library/jest-dom/blob/918b6fbcde10d4409ee8f05c6e4eecbe96a72b7a/src/to-be-disabled.js#L64C10-L64C37
and the function should be written like this instead:
Before checking the parent, the function should be checking that the attribute is not specified on the element.
The text was updated successfully, but these errors were encountered: