emberjs / emberjs/ember-test-helpers

Focusout event not triggered when test window is not focused

Open
#692 16 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
188
Forks
254
PR merge metrics
No merged PRs in 30d

Description

So, I have a simple Ember component input which has the built-in `focusOut` Ember event. In an integration test, using `ember-test-helpers` `triggerEvent(input, 'blur')` on this input or `fillIn(other-input, 'blbl')` in another input does not trigger the `focusOut` event if the window test is not focused while running.

I created a new Ember project to demonstrate this bug (see `tests/integration/my-component-test.js`), you can check it out here => [test-focusout](https://github.com/schorke/test-focusout)

### How to test
1. `ember t -s --filter='Integration | Component | my-component'`
2. Open dev tools in test window.
3. Click in console and refresh page (click inside test window if you want to re-focusin).
4. Same behaviour when running the test while focusing another window.
Reproduced on Chrome 76.0.3809.87 and Firefox 68.0.1

Is that the expected behaviour ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.