dodo / jquery-inputevent Goto Github PK
View Code? Open in Web Editor NEWCross browser oninput event for jQuery
Home Page: http://whattheheadsaid.com/projects/input-special-event
Cross browser oninput event for jQuery
Home Page: http://whattheheadsaid.com/projects/input-special-event
Note: For a test set up don't rely on debugger only.
The event fires twice (checked by console.log()) as long as in the bindTo Array the "keyup" String is present!
Just remove it to get Input and Textarea working
I have a page that loads form elements dynamically after load. In order to catch events fired by these elements I have attached to the event further up the DOM like this:
$('body').on 'txtinput', '[data-toggle=clear]', (e) ->
However after the first text box I interact with none of the ones I interact with after that fire the event correctly.
I'm using the latest Chrome on OSX.
Tracing through it quickly the problem seems to be with how the event is bound if isSupported(elem)
is false using the dlgtTo
events. Anyways I'd try for a fix, but give that this library is attempting to be 100% cross-browser compatible I think it might be a bit hard.
Anyways an alternative fallback I've taken the approach of just polling any focused textboxes every 500ms or so. This approach could simply be "skipped" for browser that properly support the new "input" events. It isn't perfect, but it works for most scenarios.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.