Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Autocomplete doesn't work on any BrowserStack's mobiles with Android 2.x #78

Open
MggLp opened this issue Jul 11, 2014 · 0 comments
Open

Comments

@MggLp
Copy link

MggLp commented Jul 11, 2014

I there,

I built a mobile application in ASP.NET 4.5 with your autocomplete and it works fine on Android 4.x but doesn't work at all with Android 2.x (tested with Samsung, Motorola, HTC).

I tried putting some alert('????') in the jqm.autoComplete-1.5.2.js but could not understand where's the problem as I could not spot any JS error being thrown. The best I could find was here:

$.fn.autocomplete = function (method) {
//////
alert('$.fn.autocomplete 1');
//////
if (methods[method]) {
//////
alert('$.fn.autocomplete 2');
//////
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
} else if (typeof method === 'object' || !method) {
//////
alert('$.fn.autocomplete 3');
//////
return methods.init.apply(this, arguments);
}
};

None of the 3 alerts in the code above is triggered in Android 2.x !

Is this a known problem ? and if so where is it ? Javascript, jquery ? Is there a workaround ?

Any help is deeply appreciated.

Below is some of the relevant code:

In the BuildConfig class where I make the JS bundle I'm using the files below:
[...]
"/Scripts/WebForms/MsAjax/MicrosoftAjaxCore.js",
"
/Scripts/WebForms/MsAjax/MicrosoftAjaxComponentModel.js",
"/Scripts/WebForms/WebForms.js",
"
/Scripts/WebForms/MenuStandards.js",
"/Scripts/jquery-1.10.0.min.js",
"
/Scripts/jquery.mobile-1.4.2.min.js",
"/Scripts/jqm-datebox/jqm-datebox.core.js",
"
/Scripts/jqm-datebox/jqm-datebox.mode.calbox.js",
"/Scripts/jqm-datebox/jqm-datebox.mode.datebox.js",
"
/Scripts/jqm-datebox/i18n/jquery.mobile.datebox.i18n.en.utf8.js",
"/Scripts/jqm-datebox/i18n/jquery.mobile.datebox.i18n.es-ES.utf8.js",
"
/Scripts/jqm-datebox/i18n/jquery.mobile.datebox.i18n.pt-PT.utf8.js",
"/Scripts/jquery.unobtrusive-ajax.min.js",
"
/Scripts/jquery.validate.min.js",
"/Scripts/jquery.validate.unobtrusive.min.js",
"
/Scripts/jqm.autoComplete-1.5.2.js",

                // custom files of app
                "~/Scripts/Page.js",
                "~/Scripts/Dossiers.js"
                [...]

the autocomplete is configured in a JS file as:
[...]
this.$txtDossier.autocomplete({
icon: "carat-r",
target: this.$ulSearchResults,
source: "api/dossier/getfilteredby",
callback: this.onClick.bind(this),
loadingHtml: this.getAutocompleteLoadingHtml.bind(this, searchingText),
minLength: 3,
cancelRequests: true
});
[...]

The markup I'm using is this:

<%@ Control Language="C#" CodeBehind="DossiersView.ascx.cs" Inherits="Sgc.Mobile.Web.DossiersView" %>

  •         <%-- textbox where autocomplete's search text is keyed in --%>
            <asp:TextBox ID="txtDossier" MaxLength="35" data-clear-btn="true" data-val="true" data-type="search" runat="server" />
    
            <span class="field-validation-valid error" data-valmsg-for="<%=this.txtDossier.UniqueID%>" data-valmsg-replace="true"></span>
            <div>
    
                <%-- autocomplete's search results --%>
                <ul id="ulSearchResults" data-role="listview" data-filter="true" data-input="#txtDossier" data-ajax="false" data-inset="true" runat="server"></ul>
    
            </div>
        </li>
    </ul>
    
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant