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
To Reproduce
Steps to reproduce the behavior:
Discovered when attempting to convert tests from jsdom to happy-dom
it('input should not have focus if disabled', () => {
props.disabled = true;
renderComponent();
screen.getByTestId('input').focus();
expect(screen.getByTestId('input')).not.toHaveFocus();
});
Expected behavior
Calling focus() when an input is disabled should not dispatch any events
The text was updated successfully, but these errors were encountered:
Describe the bug
As per the spect (see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled#attribute_interactions), calling focus() on an input element that is disabled should fire focus or change the active element.
To Reproduce
Steps to reproduce the behavior:
Discovered when attempting to convert tests from jsdom to happy-dom
Expected behavior
Calling focus() when an input is disabled should not dispatch any events
The text was updated successfully, but these errors were encountered: