Tuesday, April 21, 2015

Solution:IE 10 and below + Escape twice form values are clearing

Problem: IE 10 and below + Escape twice form values are clearing all input values/ Reset the form values.

Solution:

Add the below script to your document ready function.

$('input[type="text"]').keydown(function(e){
               var ingnore_key_codes = [27];
               if ($.inArray(e.keyCode, ingnore_key_codes) >= 0){
                  e.preventDefault();
               }
        });

No comments:

Post a Comment