Dart, Polymer 0.5, Dartium.
In a page I have some div element with core-a11y-keys inside, keys are "up down left right". It works perfectly, some actions are happened after key down.
Also I have input field on the page. And problem is I can't use arrow keys in it because of core-a11y-keys.
Question is: how to avoid destruction behavior?
HTML:
<body>
<div id="widgetContainer">
<core-a11y-keys target="{{body}}" keys="up down left right"
on-keys-pressed="{{widgetContainer_on_move_keys}}">
</core-a11y-keys>
</div>
<input id="txtInput">
</body>
Make sure that the
targetattribute ofcore-a11y-keysis in fact present and targeting thediv, otherwise it will apply to the whole page including yourinput. See here for more detail on how to do that: https://groups.google.com/a/dartlang.org/forum/m/#!topic/web/k8Wzj6KCfgMIf your
inputwas a child of thedivthat yourcore-a11y-keyswas targeting, it would be doing what you instructed it to do anywhere in thatdiv: intercepting keystrokes. In that case, you would need to handle theonKeyPressevent in theinputlike<input on-keypress="{{handleInputKeyStrokes}}">:I haven't tried this, and it may be that you need
onKeyUpandonKeyDowninstead, as in https://stackoverflow.com/a/13746419.