There was a bug related to this that I believe has been addressed. Would you mind checking if this is fixed if you use polymer master?
One easy way to do this is via bower: bower install Polymer/polymer#master. Thanks On Thu, Jan 9, 2014 at 1:54 AM, Martin Kleinschrodt < [email protected]> wrote: > Apparently the derived element uses the wrong bind method. Overriding bind > and explicitly calling HTMLElement.prototype.bind solves the problem. Seems > to be some bug in CustomElements. > > <polymer-element name="fast-input" extends="input" touch-action="none" > on-tap="{{ tap }}" on-mousedown="{{ mousedown }}"> > <script> > Polymer("fast-input", { > tap: function(event) { > this.setSelectionRange(this.value.length, > this.value.length); > }, > mousedown: function() { > event.preventDefault(); > }, > bind: function() { > return HTMLInputElement.prototype.bind.apply(this, > arguments); > } > }); > </script> > </polymer-element> > > > > On Wednesday, January 8, 2014 9:30:36 PM UTC+1, Martin Kleinschrodt wrote: >> >> So I've created this custom input element to get rid of the 300ms >> focussing delay when tapping into an input element on mobile: >> >> <polymer-element name="fast-input" extends="input" touch-action="none" >> on-tap="{{ tap }}" on-mousedown="{{ mousedown }}"> >> <script> >> Polymer("fast-input", { >> tap: function(event) { >> this.setSelectionRange(this.value.length, >> this.value.length); >> }, >> mousedown: function() { >> event.preventDefault(); >> } >> }); >> </script> >> </polymer-element>. >> >> This works fine. Unfortunately, using a custom extension of the input >> element seems to mess with data binding. So this >> >> <input is="fast-input" value="{{ myValue }}" /> >> <div>{{ myValue }}</div> >> >> does no longer work. >> >> Is this a bug or am I doing something wrong? >> >> 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
