0

I have following code to capture onkeyPress event for the top level svg element. but system does not capture keyboard events. I can capture mouse eventrs without any problem. HTML has following statement:

<svg id="mysvg" width="600" height="400">
  ...
</svg>

and Dart script has the following:

SvgSvgElement mysvg = $['mysvg'];
mysvg.onKeyPress.listen(onData);

...
onData(KeyboardEvent e) {
   print("key pressed");
}

The code is in a polymer component running on windows 8 platform. Dart version 1.10.0.

Is keyboard capture on svg not yet implemented in Dart? Any help will be appreciated. Thanks!

Tusshu
  • 1,664
  • 3
  • 16
  • 32

0 Answers0