Bug Tracker

Ticket #12370 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

jquery android 2.1-update1 problem

Reported by: pletnev.rusalex@… Owned by: mikesherov
Priority: blocker Milestone: 1.8.1
Component: core Version: 1.8.0
Keywords: Cc:
Blocking: Blocked by:

Description

<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
</head>
<body>
  <script>
    $(function(){
      alert(1);
    });
  </script>
</body>
</html>

loading this page in android 2.1-update1 nothing happens. using jquery 1.7.2 everything is ok.

Change History

comment:1 follow-up: ↓ 4 Changed 2 years ago by dmethvin

  • Owner set to pletnev.rusalex@…
  • Status changed from new to pending

Do you get any errors? I don't think any of the core folks have a device with Android 2.1 so we may need to pull in the Mobile team on this.

comment:2 Changed 2 years ago by mikesherov

@dmethvin, we can test on browserstack for android 2.1, but is it supported? According to this,  http://developer.android.com/about/dashboards/index.html , Android 2.1 has 4% of mobile marketshare, and dropping.

comment:3 Changed 2 years ago by dmethvin

  • Owner pletnev.rusalex@… deleted
  • Status changed from pending to new

Well, Mobile says they support it ...  http://jquerymobile.com/gbs/

If the numbers are that low now, however, I wonder if both teams should reconsider.

comment:4 in reply to: ↑ 1 Changed 2 years ago by pletnev.rusalex@…

Replying to dmethvin: no any visible errors.

comment:5 Changed 2 years ago by dmethvin

  • Status changed from new to open

Todd Parker confirmed it doesn't work.

works with 1.7.2 -  http://jsbin.com/aqevig/2/edit but not 1.8.0 -  http://jsbin.com/aqevig/1

Last edited 2 years ago by scott.gonzalez (previous) (diff)

comment:6 Changed 2 years ago by mikesherov

  • Owner set to mikesherov
  • Priority changed from undecided to blocker
  • Status changed from open to assigned
  • Component changed from unfiled to core
  • Milestone changed from None to 1.8.1

dmethvin, this might be the final nail in the coffin for readyState=="interactive", unless we can prove this was fixed in a subsequent Android update, but all the emulators I have available on browserstack don't repro this bug, including the one that is purportedly 2.1.

If Todd can confirm this happens in a later version of Android, we might have to pull on readyState interactive.

comment:8 Changed 2 years ago by dmethvin

Although we landed gh-907 and it did fix the IE9 problems, it did not fix these Android issues according to Wilto (Mat Marquis).

comment:9 Changed 2 years ago by mikesherov

I really would love to know which phone / emulator this fails in so I can repro.

comment:10 Changed 2 years ago by dmethvin

Browserstack doesn't have one that goes back to 2.1, which is telling us something.

comment:11 Changed 2 years ago by pletnev.rusalex@…

it fails on ./android-sdk-linux/tools/android create avd -n 2.1 -t 6

comment:12 follow-up: ↓ 13 Changed 2 years ago by dmethvin

Is there any more information you can give us on how it is failing? Debugging mobile devices is soooooo fun.

comment:13 in reply to: ↑ 12 Changed 2 years ago by pletnev.rusalex@…

Replying to dmethvin:

Is there any more information you can give us on how it is failing? Debugging mobile devices is soooooo fun.

No. it's just blank page  http://jsbin.com/aqevig/1

comment:14 Changed 2 years ago by patrick@…

Just debugged the example above (wrapped in a webview and deployed as a native app) on the android 2.1 emulator. Here is the critical line from the debugging log:

JavaScript execution exceeded timeout. -- From line 8871 of  http://code.jquery.com/jquery-1.8.0.js

comment:15 Changed 2 years ago by dmethvin

Thanks! I think this may point to the cause and a solution. That's in a loop depending on includeWidth being coerced from Boolean to integer; the Android browser must not be doing that right and wedging itself in the loop.

Last edited 2 years ago by dmethvin (previous) (diff)

comment:16 Changed 2 years ago by timmywil

  • Status changed from assigned to closed
  • Resolution set to fixed

comment:17 follow-up: ↓ 18 Changed 2 years ago by dmethvin

@patrick, can you retest to confirm that we fixed the problem? I really appreciate your help!

comment:18 in reply to: ↑ 17 Changed 2 years ago by prud

Replying to dmethvin:

@patrick, can you retest to confirm that we fixed the problem? I really appreciate your help!

Works fine in the (rather limited) example from above. Glad that I was able to help :)

comment:19 Changed 2 years ago by prud

I just gave it a try on a more complex mobile web app (again wrapped in a webview), which made it fail at another position:

JavaScript execution exceeded timeout. -- From line 1222 ..

Hope this helps narrowing it down further. Please re-open.

comment:20 follow-up: ↓ 21 Changed 2 years ago by dmethvin

@prud, we've successfully addressed the issue in this ticket, which was that document.ready didn't fire in Android 2.1 with the given test case. There may be other issues with Android 2.1, but they should get their own ticket and reduced test case.

comment:21 in reply to: ↑ 20 Changed 2 years ago by prud

Replying to dmethvin:

@prud, we've successfully addressed the issue in this ticket, which was that document.ready didn't fire in Android 2.1 with the given test case. There may be other issues with Android 2.1, but they should get their own ticket and reduced test case.

Of course, you're absolutely right. Will open another one if I can narrow it down a bit.

Note: See TracTickets for help on using tickets.