简体   繁体   中英

Chrome not firing onchange event when entering a space on HTML input field with type email

I was wondering if anyone can reproduce the following issue.

This was tested in Chrome 38.0.2125.101 beta-m

When I enter a space in a regular <input type="text"> field, the onchange event is fired. With an <input type="email"> though, the onchange event does not fire.

Jsfiddle: http://jsfiddle.net/L8j2hmme/

Any ideas?

It works fine for me but action is fired with delay and when multiple spaces are typed.Also whitespace is not valid character

<input type="email" name="email" id="email" />


function _x(elem){
   return document.getElementById(elem);
}

var x = _x("email");

x.onchange = function(){
 console.log(1);
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM