[TIMOB-2022] iOS: Webview Fire/Listen event problems that started after SDK 1.3.2
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-12-04T13:11:29.000+0000 |
Affected Version/s | Release 1.7.5 |
Fix Version/s | Sprint 2011-48 |
Components | iOS |
Labels | n/a |
Reporter | Lee |
Assignee | Sabil Rahim |
Created | 2011-04-15T03:08:20.000+0000 |
Updated | 2017-03-02T22:49:45.000+0000 |
Description
The enclosed app.js, win.js, script.js, test.htm files illustrate a problem that only occurred in releases after Titanium SDK 1.3.2.
If you create an app with these files, using SDK 1.3.2 and iPhone SDK 4.1, it will work perfectly in the emulator and on an Apple device.
If you compile using any Titanium SDK after 1.3.2 (including 1.4.1.1 and 1.4.2), the app will work perfectly in the emulator but will fail on the device.
The enclosed sample uses evalJS(), but also failed in earlier versions, in which test.htm's onload event was used instead.
Attachments
File | Date | Size |
---|---|---|
testLinkCrash_2011-11-30-094234_qgaombp.crash | 2011-11-30T09:48:49.000+0000 | 40137 |
webvieweventtest.zip | 2011-04-15T03:08:21.000+0000 | 2043 |
Tested 1.6.0GM, test in bugtests. It brought a tear to my eye.
Hold our horses; it works OUTSIDE of bugtests... but not in it?!? Looks like we need some R&D.
Post 1.7.0 investigation. Please regress.
This occurs with SDK 1.8.0.1.v20111111081456, iPad 1 (iOS 4.3.5)
Please see a very simple example here: http://pastie.org/2905998 In the example app, enter a URL in the textarea and hit return. It will create and new webview/window and open in. When a URL is used that will throw an error ("https://www.yahoo.org" and "http://www.yahoo.com," are examples), the app will crash under iOS5. Removing the error eventlistener prevents this effect.
This is not a bug. This occurs as result of how we bundle our app. If any js script file needs to be included in the file like in this instance where an html document is trying to access it's javascript file, please make sure to put it inside the Resources folder so that it doesn't get bundled into the app and only get copied over. So the solution for this problem would be to place the script.js file inside Resources > iphone> and run the same app. Everything should work fine. NOTE:This happens only on device as, during sim runs, only soft links are generated and nothing happens to the actual file and during bundling the all the js files are changed over.
Closing ticket as invalid.