Hi John,

Oninput is a firefox event, it fires whenever the text being  
displayed would change, e.g. after a paste (so it's similar to the IE  
event onpaste). Onkeypress won't catch right-click pastes or auto- 
completion, and I believe that onchange doesn't fire until the field  
loses focus.

Anyway, it's not really a jQuery problem, there is a bug filed for it  
(since it clearly doesn't function even when used directly). I was  
just hoping there might be a jQuery way to implement the workaround  
to avoid dragging in other libraries that aren't otherwise needed.

Regards,
Duncan


On 09/10/2006, at 5:03 PM, John Resig wrote:

> I can safely say that I've never heard of the 'input' event. Nor  
> has Quicksmode:
> http://www.quirksmode.org/js/events_compinfo.html
>
> Perhaps you meant something else? (onkeypress? onchange?)
>
> --John
>
> On 10/9/06, Duncan Anker <[EMAIL PROTECTED]> wrote:
>> I've been trying to use oninput to validate fields in firefox and  
>> have
>> had zero luck with it the jQuery way:
>>
>> element.bind('input', ...)
>>
>> is just not cutting it. After some digging around on the net I  
>> *finally*
>> found some useful, although mildly depressing, information about it.
>> What it seems to boil down to is a bug in firefox (and mozilla  
>> codebase
>> in general I expect).
>>
>> This is okay:
>>
>> <input oninput="...">
>>
>> So is this:
>>
>> element.addEventListener('input', ...)
>>
>> This doesn't work:
>>
>> element.oninput = function() { ...
>>
>> So I'm figuring that jQuery must perform its cross-platform magic  
>> using
>> the latter form.
>>
>> Does anyone have any ideas about how to handle this? I want to stay
>> unobtrusive, so I don't want the handlers defined in my HTML, and  
>> I want
>> to be cross-platform, and I'd rather not implement a cross-platform
>> event handler just for the one event, especially since there is  
>> already
>> one in jQuery.
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to