Side navigation
#13574 closed bug (duplicate)
Opened March 06, 2013 03:55PM UTC
Closed March 06, 2013 04:01PM UTC
Crashes on Android 2.3 webview
Reported by: | garnold@garyarnold.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | manipulation | Version: | 2.0b1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I'm using jQuery-2.0.0b1 in an Android PhoneGap app. It works fine under Android 4.0 and 4.2, but testing it on an older Android 2.3 device, it crashes:
03-06 07:35:47.412: DEBUG/CordovaLog(3605): Uncaught TypeError: Function.prototype.apply: Arguments list has wrong type 03-06 07:35:47.412: DEBUG/CordovaLog(3605): file:///android_asset/www/libs/jquery-2.0.0b1.js: Line 5668 : Uncaught TypeError: Function.prototype.apply: Arguments list has wrong type 03-06 07:35:47.412: ERROR/Web Console(3605): Uncaught TypeError: Function.prototype.apply: Arguments list has wrong type at file:///android_asset/www/libs/jquery-2.0.0b1.js:5668
Line 5668 is the "core_push.apply" line in this snippet:
// Add nodes directly if ( jQuery.type( elem ) === "object" ) { core_push.apply( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) );
The bug occurs when attaching jQuery UI Autocomplete to a text input field. The stack trace and code snippet are:
buildFragment(elems=[Object[ul.ui-autocomplete]], context=Document index.html, scripts=false, selection=Object[body]) jquery-2.0.0b1.js (line 5668) domManip(args=[Object[ul.ui-autocomplete]], table=true, callback=function()) jquery-2.0.0b1.js (line 5516) append() jquery-2.0.0b1.js (line 5335) (?)(selector=body) jquery-2.0.0b1.js (line 5602) _create() jquery-ui-1.10.0.custom.js (line 1486) _superApply() jquery-ui-1.10.0.custom.js (line 405) _createWidget(options=Object { minLength=2, source=function()}, element=input#title.textinput) jquery-ui-1.10.0.custom.js (line 564) (?)(options=Object { minLength=2, source=function()}, element=input#title.textinput) jquery-ui-1.10.0.custom.js (line 366) (?)() jquery-ui-1.10.0.custom.js (line 511) each(obj=Object[input#title.textinput], callback=function(), args=undefined) jquery-2.0.0b1.js (line 570) each(callback=function(), args=undefined) jquery-2.0.0b1.js (line 237) bridge(options=Object { minLength=2, source=function()}) jquery-ui-1.10.0.custom.js (line 506) render(eventName=undefined) HomeView.js (line 83)
Line 83 of HomeView.js:
this.$( "#title" ).autocomplete({source: filterSuggestions,minLength: 2});
I have not included the jquery-ui-1.10.0.custom.js file, but I can supply it if needed.
Adding some console.log() calls at the site of the error to examine the nodes and elem variables gives:
03-06 07:49:26.607: DEBUG/CordovaLog(3791): nodes type = [object Array] 03-06 07:49:26.607: DEBUG/CordovaLog(3791): nodes = [] 03-06 07:49:26.607: DEBUG/CordovaLog(3791): elem type = [object Object] 03-06 07:49:26.627: DEBUG/CordovaLog(3791): Uncaught TypeError: Converting circular structure to JSON
So I'm not sure what elem actually contains. On an able-bodied browser, it is:
elem = {"0":{},"length":1}
Please let me know if there is any more information I can supply.
-g.
Attachments (0)
Change History (1)
Changed March 06, 2013 04:01PM UTC by comment:1
component: | unfiled → manipulation |
---|---|
resolution: | → duplicate |
status: | new → closed |
version: | 2.0b2 → 2.0b1 |
Duplicate of #13282.This should be fixed in 2.0.0b2. Please let us know if you find otherwise.