Bug Tracker

Opened 9 years ago

Closed 9 years ago

#7554 closed bug (worksforme)

.text(2) and .html(2) causing iPad to hang

Reported by: owenocq@… Owned by: owenocq@…
Priority: low Milestone: 1.5
Component: unfiled Version: 1.4.4
Keywords: ipad text html hang Cc:
Blocked by: Blocking:

Description

var count = 2
$("#count").text("")
$("#count").text(count)

Within my code I had roughly the above. On the iPad it was causing the system to freeze for about 5 seconds but will eventually display the correct thing. I fixed it by converting the number to a string (but took a while to track down!):

var count = 2
$("#count").text("")
$("#count").text(count+"")

This is a new bug for version 1.4.4 as 1.4.3 and 1.4.2 were previously tested against

Change History (2)

comment:1 Changed 9 years ago by snover

Owner: set to owenocq@…
Status: newpending

I am not sure how passing a number to .text could possibly be slow, and I am similarly incredulous that any slowdown could be seen passing a single character to .html, despite the fact that it will only take the fast path if the data passed is a string. Could you please provide a minimal test case that demonstrates this issue?

comment:2 Changed 9 years ago by addyosmani

Keywords: ipad text html hang added
Priority: undecidedlow
Resolution: worksforme
Status: pendingclosed

I have reproduced your test case here Live Test Case and run this on both an iPad and the iPad Emulator. Neither had any issues setting text to the value of 'count' as per the first piece of code you reference. Closing as this works for me, however if you have another test case you can submit which can reproduce this issue we will re-investigate.

Note: See TracTickets for help on using tickets.