Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 391048

Summary: [iOs6] No requests will be sent anymore after executing window.setInterval() while scrolling
Product: [RT] RAP Reporter: Claudio Guglielmo <claudio.guglielmo>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: rsternberg, tbuschto
Version: 1.5   
Target Milestone: 2.1 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
ios6 bug workaround none

Description Claudio Guglielmo CLA 2012-10-03 13:04:28 EDT
Created attachment 221858 [details]
ios6 bug workaround

IOS 6 introduced a new bug: 
http://stackoverflow.com/questions/12683510/ios-6-safari-setinterval-doesnt-get-fired

This has huge effect on mobile webapps based on rap. When sending a request rap uses window.setInterval() to delay the sending a little bit. Unfortunately the interval event will never be fired and therefore no requests will be sent anymore -> The app is dead.

In the above post, someone pointed to the following workaround:
http://www.linkedin.com/groups/iOS6-Webkit-Time-Bug-Solution-2868882.S.166494843

It tried it and it seems to work.

Of course, this problem is not rap's fault, it's a bug in iOS. But we need to have a workaround until apple solves the issue. The attached patch contains the workaround from https://gist.github.com/3755461 with an additional check for ios6 devices.
Comment 1 Ralf Sternberg CLA 2013-03-04 10:02:20 EST
CQ 7089 has been approved. We've got the go-ahead to use the code from https://gist.github.com/ronkorving/3755461.
Comment 2 Tim Buschtoens CLA 2013-03-13 11:58:34 EDT
Included the script with commit 1fe5bdef934deba8c146c8a41cde4ffdc53763e1.

It will be only executed on iOS 6, but is always included. To counter that (client size) i threw out some old IE-fixes that weren't used anywhere.

The script is in BrowserFixes.js, and the check is:
/iPad|iPhone|iPod/.test( navigator.userAgent ) 
&& /Version\/6/.test( navigator.userAgent ) 

Should we get more precise information where the issues exists we should update it. For now i'll assume that it will be fixed in iOS 7, as it is a known issue.