Focusout event not triggered when test window is not focused
See original GitHub issueSo, 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
How to test
ember t -s --filter='Integration | Component | my-component'
- Open dev tools in test window.
- Click in console and refresh page (click inside test window if you want to re-focusin).
- 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 ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (13 by maintainers)
Top Results From Across the Web
focusout() or blur() not triggered with popup
You can't get any focus events for normal divs. You can manually check if mouse clicked outside that popup: document.body.
Read more >Element: focusout event - Web APIs | MDN
The opposite of focusout is the focusin event, which fires when the element has received focus. The focusout event is not cancelable.
Read more >onfocus Event
Definition and Usage. The onfocus event occurs when an element gets focus. The onfocus event is often used on input fields.
Read more >.focus() | jQuery API Documentation
A function to execute each time the event is triggered. version added: 1.0.focus(). This signature does not accept any arguments.
Read more >blur and focus - Events
blur and focus ; Window + focusable element. If the window is sent backward while a focusable element is focused, blur events should...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Lets do it!
You are suggesting that we would effectively to do:
Inside
fillIn
/typeIn
/click
?