[TIMOB-3505] Re-opening a window breaks all event handlers (iOS)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-07T22:57:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | defect, ios |
Reporter | John Johnson |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:46:01.000+0000 |
Updated | 2017-06-07T22:57:21.000+0000 |
Description
Hi
Please see the following code: http://pastie.org/1755281">http://pastie.org/1755281
iOS SDK 4.2, Titanium SDK 1.6.1, Xcode 3.2.5, tested on both the simulator and physical device
I'm trying to create a window that implements a webview with a pageflipper.
My pageflipper fires some custom events using Ti.App.fireEvent( 'nextPage' ); etc., which works amazingly well.
... until I close the window and try to open the window again. Now, my custom events don't get fired. This happens randomly. Sometimes it works the first time, second time, not the third time etc. It always works the first time though.
I think it has something to do with the webview doing a reload() when the window is opening again, which breaks the listener connection (#2641).
My app is ready to be submitted to the App Store but this bug is stalling me. I really need this to be fixed ASAP with some kind of workaround.
Thank you.
John - please state your environment - what Ti / iOS SDK / XCode versions are you using? Have you tested it in the simulator and/or a physical device? Please amend your ticket, adding this information.
Note the issue does not exist on Android Ti 1.6.1, Android 2.2.
As the code is short, I've pasted it below (errors fixed):
app.js:
win2.js:
webview.html:
Hi hal,
I've updated my ticket to reflect my environment. Is it possible to create a workaround or is it indeed a bug?
Anything new?
Closing ticket due to time passed.