I have a paper-input-container next to a paper-icon-button and want to trigger the same function that is wired to the paper-icon-button's on-tap handler when a user hit's enter while the input has focus... anyone know how to do this.
<dom-module is="keypress-test">
<template>
<paper-input-container id="input">
<label>Enter Should Trigger</label>
<input is="iron-input"></input>
</paper-input-container>
<paper-input label="Enter Won't Trigger"></paper-input>
<paper-button on-tap="_test()"></paper-button>
</template>
</dom-module>
<script>
Polymer({
is: "keypress-test",
ready: function(){
},
_test: function(){
console.log("Button Clicked")
}
})
</script>
Use
iron-a11y-keys
to listen for an enter keypress