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
Scenario:
Expected result: GIVEN There are two elements on the form: focusable input and label (simple div). AND Input element has focus WHEN Click on the label occurs (via click test helper) THEN Input gets blur event and loses its focus
Actual result: Input doesn't get blur event and doesn't lose its focus
The root cause of the issue is that the blur event is not triggered on the current active element in the click helper in case if the clicked element is not focusable.
If the clicked element is focusable the previous active element gets blur event trough the focus helper.
Proposed solution: Add a call to blur for the case when the clicked element is not focusable.
Real world example: The issue is noticed in the integration test for dropdown component with Ember Power Select in the real application. When click occurs on the dropdown option (non-focusable element) then input doesn't lose its focus in the test but it does in the real application. So Click test helper has different behaviour with browser click.
The text was updated successfully, but these errors were encountered:
Scenario:
Expected result:
GIVEN There are two elements on the form: focusable input and label (simple div).
AND Input element has focus
WHEN Click on the label occurs (via click test helper)
THEN Input gets blur event and loses its focus
Actual result:
Input doesn't get blur event and doesn't lose its focus
The root cause of the issue is that the blur event is not triggered on the current active element in the click helper in case if the clicked element is not focusable.
If the clicked element is focusable the previous active element gets blur event trough the focus helper.
Proposed solution: Add a call to blur for the case when the clicked element is not focusable.
Real world example: The issue is noticed in the integration test for dropdown component with Ember Power Select in the real application. When click occurs on the dropdown option (non-focusable element) then input doesn't lose its focus in the test but it does in the real application. So Click test helper has different behaviour with browser click.
The text was updated successfully, but these errors were encountered: