ember-native-dom-helpers
ember-native-dom-helpers copied to clipboard
Follow up on focus event helper function
@rwjblue there is one other point to chat about at some point too, the focus method in the existing test helpers has an issue with Firefox and focus on window or not. I was able to resolve that in this library as I added test running via Chrome, Firefox on Travis as well.
See…
https://github.com/cibernox/ember-native-dom-helpers/blob/master/addon-test-support/helpers.js#L11-L31
vs.
https://github.com/emberjs/ember.js/blob/7819409b7b6559e9fc0300a29e66a16356fb67a7/packages/ember-testing/lib/events.js#L8-L27
Tests to investigate:
- https://github.com/emberjs/ember.js/blob/7819409b7b6559e9fc0300a29e66a16356fb67a7/packages/ember-testing/tests/helpers_test.js#L696-L728
- https://github.com/emberjs/ember.js/blob/7819409b7b6559e9fc0300a29e66a16356fb67a7/packages/ember-testing/tests/helpers_test.js#L354-L425
These tests failed for us when running on Firefox or phantomjs…
- https://github.com/cibernox/ember-native-dom-helpers/blob/master/tests/integration/fill-in-test.js
- https://github.com/cibernox/ember-native-dom-helpers/blob/master/tests/integration/click-test.js
…the focus part was the issue
Test failure example, focus not firing when window does not have focus:
- https://travis-ci.org/cibernox/ember-native-dom-helpers/jobs/202589665