Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Callback for Key Press Event Fails #21

Open
2 of 9 tasks
gcortes opened this issue Aug 5, 2016 · 0 comments
Open
2 of 9 tasks

Callback for Key Press Event Fails #21

gcortes opened this issue Aug 5, 2016 · 0 comments

Comments

@gcortes
Copy link

gcortes commented Aug 5, 2016

Description

I'm using a paper-listbox in an Angular2Dart component. I set up a callback in the ngOnInit method.
listbox = querySelector('.scroll-list'); listbox.addOwnKeyBinding('pageup', 'onPageUp');
When the pageup button is press when the listbox has focus, an error is thrown:

Uncaught TypeError: Cannot read property 'call' of undefined Polymer.IronA11yKeysBehavior._triggerKeyHandler @ (index):14940 Polymer.IronA11yKeysBehavior._onKeyBindingEvent @ (index):14924

The code at 14940 is:

this[handlerName].call(this, event);

handlerName = "onPageUp"
this = paper-listbox.scroll-list

More detail and code can found here: http://stackoverflow.com/questions/38773268/polymer-call-back-giving-the-error-uncaught-typeerror-cannot-read-property-ca

My pubspec file specifies:
polymer: ^1.0.0-rc.17
polymer_elements: ^1.0.0-rc.8

Expected outcome

The callback method being invoked

Actual outcome

The error given above.

Live Demo

Steps to reproduce

The basis for my code is the https://dart.academy/dart-angular-2-and-polymer-together/
I imagine you could add a listbox to it and reproduce it.

Browsers Affected

  • Dartium
  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant