Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Advance to year field when / is pressed #48

Merged
merged 1 commit into from
Apr 26, 2016

Conversation

samuelli
Copy link
Contributor

Fixes #36

@@ -27,7 +27,8 @@
"iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
"paper-input": "PolymerElements/paper-input#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
"polymer": "Polymer/polymer#^1.1.0"
"polymer": "Polymer/polymer#^1.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alphabetical order, please!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@notwaldorf
Copy link
Contributor

Would you mind adding a test for this, please? Check out MockInteractions in iron-demo-helpers for key events help 😊

@samuelli
Copy link
Contributor Author

Having a lot of trouble with this. The following works for a but not for @ and /.

keyBindings: { 'a': '_selectYear', '@': '_selectYear', '/': '_selectYear' },

so I'm not sure if iron-a11y-keys-behavior is broken. There's a test for @ but I haven't been able to get it work outside of the test.

@notwaldorf
Copy link
Contributor

paging @valdrinkoshi, our a11y-keys keeper :)

@valdrinkoshi
Copy link
Member

Hi @samuelli, I'm not sure I understand where's the problem. Is it in the tests?
Since the three bindings point to the same method, you can just do:

keyBindings: { 'a @ /' : '_selectYear' }

http://jsbin.com/ciboye/1/edit?html,output

@samuelli
Copy link
Contributor Author

@valdrinkoshi: Only the a key seems to work in that demo. I'm unable to trigger on @ or /.

@samuelli samuelli force-pushed the advanceToYear branch 2 times, most recently from e2f95e0 to 01a7af2 Compare April 25, 2016 22:01
@samuelli
Copy link
Contributor Author

Those keys seem to work now. Added a test but its blocked on https://github.com/PolymerElements/iron-test-helpers/pull/47/files

@samuelli
Copy link
Contributor Author

ping @notwaldorf

@notwaldorf
Copy link
Contributor

Thanks! LGTM

@notwaldorf notwaldorf merged commit 166c4b8 into PolymerElements:master Apr 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants