Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 21E839D12 for ; Thu, 10 May 2012 00:14:10 +0000 (UTC) Received: (qmail 37332 invoked by uid 500); 10 May 2012 00:14:09 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 37284 invoked by uid 500); 10 May 2012 00:14:09 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 37180 invoked by uid 99); 10 May 2012 00:14:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 May 2012 00:14:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 May 2012 00:14:06 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id ECB0048FE72 for ; Thu, 10 May 2012 00:13:44 +0000 (UTC) Date: Thu, 10 May 2012 00:13:44 +0000 (UTC) From: "Filip Maj (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <394988149.47228.1336608825019.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <423124243.358.1335363020875.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CB-569) Script tags embedded in body content referencing packaged .js file do not load on Android 4.x MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Filip Maj updated CB-569: ------------------------- Priority: Minor (was: Major) Environment: Can reproduce with Cordova 1.6.1 and 1.7.0 on the following devices: - ASUS Transformer TF101 (Android 3.2) - HTC Desire Z (Android 2.2.1) - Samsung Galaxy Nexus (4.0.2) - Emulator (4.0.3) Cannot reproduce on: - Emulator running 2.3.3 was: *OS* Fedora 16 (kernel 3.3.2-1.fc16.i686.PAE) *Software* Eclipse (Version: Indigo Service Release 1, Build id: 20110916-0149) Eclipse plugins: Android Development Tools 17.0.0v201203161636-291853, PhonegapForAndroid 1.2.9.201204181638, ... (i'll provide full list if necessary) *Libs* Cordova 1.6.1 jQuery 1.7.2 jQuery mobile 1.1.0 *Devices* ASUS Transformer TF101 (Android 3.2) HTC Desire Z (Android 2.2.1) Fix Version/s: (was: 1.8.0) Summary: Script tags embedded in body content referencing packaged .js file do not load on Android 4.x (was: Multiscreen jquerymobile application doesn't work on Asus Transformer TF101) I tried your jQM example with a Galaxy Nexus (failed) and a Gingerbread emulator running 2.3.3 (passes). With a clean & empty cordova project, when I dynamically create and add script tags to the {{}}, it works fine on both a Gingerbread emulator and ICS device. Code: {code:javascript} function loadContent() { var s = document.createElement('script'); s.src = 'external.js'; s.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(s); } {code} Then I tried XHR'ing to external.js (to sort of mimic how jQuery mobile functions in this case), and {{eval}}'ing the contents. That worked on both Gingerbread and ICS again. Rather, it seems like script tags that are embedded inside HTML content, which gets dumped into the document, are not parsed properly by Android 4.x. Unfortunately this is a very specific case and your issue is rather with a (likely) bug in the Android WebView in Android 4.x. The mechanism with which jQuery mobile injects content, and thus your script tags, exposes this issue. Perhaps jQM should have a parser for scripts tag built-into the content switcher and dump them into the document via the method above. Or this bug should be identified and brought to Google's attention. I've identified a couple of workarounds in this issue: # You could embed the content of your local .js files within the