I've been trying to set an event listener for blur on paper-input in Polymer 2.0, no matter what I do I can't get this to fire. focus fires just fine.
Interestingly, if I drop any native input elements in my app, they also suffer the same problem.
After I failed to do this in my Polymer app, I tried to do it in the Polymer starter kit 2, and got the same result, so this is probably an easy way to repro the issue.
Expected outcome
blur event should be fired.
Actual outcome
It's not.
Live Demo
I can't find a Polymer 2.0 CDN to put a demo here. I did try a few Polymer 1.x jsbins out there and it seems that issue isn't happening for Polymer 1.x.
Steps to reproduce
mkdir test && cd test
polymer init
# choose polymer-2-starter-kit
bower install --save PolymerElements/paper-input#2.0-preview
Now drop a <paper-input></paper-input> or a <input /> in any page, and add this to in in devtools:
$0.onblur = function() { console.log('blurred');}. You could also try using the on-blur attribute.
Browsers Affected
Tested Chrome and Firefox, got this behavior on both.
Description
I've been trying to set an event listener for
blur
onpaper-input
in Polymer 2.0, no matter what I do I can't get this to fire.focus
fires just fine. Interestingly, if I drop any nativeinput
elements in my app, they also suffer the same problem. After I failed to do this in my Polymer app, I tried to do it in the Polymer starter kit 2, and got the same result, so this is probably an easy way to repro the issue.Expected outcome
blur
event should be fired.Actual outcome
It's not.
Live Demo
I can't find a Polymer 2.0 CDN to put a demo here. I did try a few Polymer 1.x jsbins out there and it seems that issue isn't happening for Polymer 1.x.
Steps to reproduce
Now drop a
<paper-input></paper-input>
or a<input />
in any page, and add this to in in devtools:$0.onblur = function() { console.log('blurred');}
. You could also try using theon-blur
attribute.Browsers Affected
Tested Chrome and Firefox, got this behavior on both.