Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

on-focus not triggering in Safari – DOM Exception 12 #53

Open
davenotik opened this issue Nov 17, 2014 · 2 comments
Open

on-focus not triggering in Safari – DOM Exception 12 #53

davenotik opened this issue Nov 17, 2014 · 2 comments

Comments

@davenotik
Copy link

Given:

<core-input on-focus="{{onFocusHandler}}"></core-input>

In Chrome, the event fires and triggers the handler. In Safari, there's an error:

[Error] Uncaught Error: Error: SyntaxError: DOM Exception 12
Stack Trace:
querySelector@[native code]
querySelector@http://woven.co/packages/web_components/platform.js:13:27896
http://woven.co/packages/web_components/platform.js:12:40234
http://woven.co/index.html_bootstrap.dart.js:13108:50

im@http://woven.co/index.html_bootstrap.dart.js:1397:15
http://woven.co/index.html_bootstrap.dart.js:17843:11
http://woven.co/index.html_bootstrap.dart.js:15652:10
mT@http://woven.co/index.html_bootstrap.dart.js:19710:41
http://woven.co/index.html_bootstrap.dart.js:15357:5
http://woven.co/index.html_bootstrap.dart.js:6353:27
http://woven.co/index.html_bootstrap.dart.js:6402:33
http://woven.co/index.html_bootstrap.dart.js:15373:35
im@http://woven.co/index.html_bootstrap.dart.js:1397:15
http://woven.co/index.html_bootstrap.dart.js:11343:21
http://woven.co/index.html_bootstrap.dart.js:11339:68
s@http://woven.co/packages/web_components/platform.js:12:57355
q@http://woven.co/packages/web_components/platform.js:12:56688
o@http://woven.co/packages/web_components/platform.js:12:56434
m@http://woven.co/packages/web_components/platform.js:12:55946
dispatchEvent@[native code]
dispatchEvent@http://woven.co/packages/web_components/platform.js:13:3176
fire@http://woven.co/packages/polymer/src/js/polymer/polymer.js:13:41710
inputFocusAction@http://woven.co/:5197:20
apply@[native code]
dispatchMethod@http://woven.co/packages/polymer/src/js/polymer/polymer.js:13:43403
http://woven.co/packages/polymer/src/js/polymer/polymer.js:14:9894
s@http://woven.co/packages/web_components/platform.js:12:57355
q@http://woven.co/packages/web_components/platform.js:12:56688
o@http://woven.co/packages/web_components/platform.js:12:56434
m@http://woven.co/packages/web_components/platform.js:12:55946
    vV (index.html_bootstrap.dart.js, line 832)
    dB (index.html_bootstrap.dart.js, line 612)
    (anonymous function) (index.html_bootstrap.dart.js, line 1459)
    (anonymous function) (index.html_bootstrap.dart.js, line 1468)
    c (platform.js, line 12)
    b (platform.js, line 12)

Note that this is in the Dart (post dart2js) version.

@ssorallen
Copy link

core-input extends the native input element. The code you typed in the issue is not using it properly, but how are you using it in your code? Your example should become this:

<input is="core-input" on-focus="{{onFocusHandler}}">

@ssorallen
Copy link

When I tested the code as I typed it in my previous comment, the onfocus handler worked fine in Safari 7.1.2 for me. Let me know if you still see this problem.

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

2 participants