Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Focus Function is working fine in IE 9 but not in IE 11 and Chrome

C#
show: function () {

            this.resetForm();
            $("input[id*=searchFilters]", this.searchForm).val('');
            this.searchForm.modal("show");
            $('input[name=searchFilters]').focus();
        },


i tried most of the solution 

$(document).ready(function(){
  $('#searchFilters').find('input[type=text],select,textarea').filter(':visible:first').focus();
});


$('#searchFilters').focusout(function() {
    setTimeout(function() {
        $(this).focus();
    }, 0);
});


Please give an best solution for this issue
Posted
Updated 16-Nov-15 22:44pm
v3

1 solution

I googled "jquery focus chrome" and this was the first result

http://stackoverflow.com/questions/17384464/jquery-focus-not-working-in-chrome[^]

Please do your own basic research before asking a question.
 
Share this answer
 
Comments
Vadivel Murthy 17-Nov-15 5:21am    
we tried all the code sample what they mentioned in that link. pls any another suggestion
F-ES Sitecore 17-Nov-15 5:28am    
Giving you solutions you've already tried is pointless and waste of time. So instead update your question to say what solutions you have already tried, that will ensure people don't suggest things you've already looked at.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900