Events jquery的自动完成方法中检测浏览器的自动填充

Events jquery的自动完成方法中检测浏览器的自动填充,events,input,browser,jquery-ui-autocomplete,autofill,Events,Input,Browser,Jquery Ui Autocomplete,Autofill,我想要地址的自动完成功能,为此我在jquery的自动完成方法下使用GoogleMapAPI 这对我来说很好,但问题是当用户从浏览器的自动填充选项中选择地址时,自动完成方法将其作为输入并发出ajax调用 那么,如果输入来自浏览器的自动填充,我如何防止ajax调用呢 这是我的密码: $('#address').autocomplete({ minLength: 7, source: function(request, response){ $

我想要地址的自动完成功能,为此我在jquery的自动完成方法下使用GoogleMapAPI

这对我来说很好,但问题是当用户从浏览器的自动填充选项中选择地址时,自动完成方法将其作为输入并发出ajax调用

那么,如果输入来自浏览器的自动填充,我如何防止ajax调用呢

这是我的密码:

$('#address').autocomplete({
        minLength: 7,
        source: function(request, response){

            $.ajax({
                method: "GET",
                url: "https://maps.googleapis.com/maps/api/geocode/json?components=country:au&address="+$('#address').val(),
                dataType: "json",
                success: function(data) {

                              // stuff on success
                }
            });
        },
        focus: function( event, ui ) {
           // stuff on focus of option
        },
        select: function(event, ui, data) {
            event.preventDefault();
           // stuff on selection of an option

        }
    });