-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
focus the toggle button on locale-change without the need to track th…
…at element. we have full control over this component's markup, so let's traverse it to markup from the click target to the toggle button, instead of tracking the toggle button separately. one less modifier.
- Loading branch information
1 parent
54236d3
commit e75c397
Showing
3 changed files
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { create, collection, triggerable } from 'ember-cli-page-object'; | ||
|
||
import { hasFocus } from 'ilios-common'; | ||
export default create({ | ||
scope: '[data-test-locale-chooser]', | ||
toggle: { | ||
scope: '[data-test-toggle]', | ||
enter: triggerable('keyup', '', { eventProperties: { key: 'Enter' } }), | ||
down: triggerable('keyup', '', { eventProperties: { key: 'ArrowDown' } }), | ||
esc: triggerable('keyup', '', { eventProperties: { key: 'Escape' } }), | ||
hasFocus: hasFocus(), | ||
}, | ||
locales: collection('[data-test-item]', {}), | ||
}); |