my core-a11y-keys implementation not working

108 views
Skip to first unread message

Jahlom Agboado

unread,
Nov 23, 2014, 1:28:33 PM11/23/14
to polym...@googlegroups.com
The following code is my implementation of core-a11y-keys but is not working. What I'm I doing wrong?


<link rel="import" href="polymer/polymer/polymer.html">
<link rel="import" href="polymer/core-a11y-keys/core-a11y-keys.html">

<polymer-element name="rappts-redball">
  <template>
  <style>
      :host {
        width: 50px;
height: 50px;
border-radius: 50px;
background-color: red;
position: absolute;
bottom: 0px;
      }
      :host #output {
      position: absolute;
top: -47px;
      }
    </style>
    <core-a11y-keys target="{{}}" keys="up pageup" on-keys-pressed="{{moveUp}}"></core-a11y-keys>
    <pre id="output"></pre>
  </template>
  <script>
    Polymer('rappts-redball', {

    moveUp: function(event) {
    this.$.output.textContent += event.detail.key + ' pressed!\n';
    console.log(event);
      }
    });
  </script>
</polymer-element>

Daniel Freedman

unread,
Nov 24, 2014, 2:07:52 PM11/24/14
to Jahlom Agboado, polymer-dev
This is missing an example of the actual instance of your `rappets-redbull` element, but my guess would be that your instance does not receive focus. The `core-a11y-keys` element is active only when the target element is focused.

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAGB-B9fLu_UhQf4o%2BA3_as7RqYZvCAA2zFF9T8-uBB9otnvBLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages