[TIMOB-26866] iOS: removeEventListener on local webview produces an error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-03-06T19:12:45.000+0000 |
Affected Version/s | Release 8.0.0 |
Fix Version/s | Release 8.0.0 |
Components | iOS |
Labels | qe-testadded, regression |
Reporter | nicolomonili |
Assignee | Vijay Singh |
Created | 2019-02-27T16:25:37.000+0000 |
Updated | 2019-04-02T18:21:45.000+0000 |
Description
I'm trying to delete an event created within a webview, via an app event.
This produces an error :
[ERROR] Error firing event 'app:deleteWebviewEvents': A JavaScript exception occurred
- The problem *is present* with the Titanium SDK *8.0.0.v20190219113758*.
- The problem *is not present* with the Titanium SDK *7.5.1GA*.
the error does not allow the removal of the event "clickFromApp", in fact, by pressing the "app --> webview" button again, the event is called again.
*Steps to reproduce:*
- Create a Classic "Default Project" app
- Replace the "app.js" code with the attached "app.js", and insert into the project also the file webview.html attached.
- Build with Titanium *8.0.0.v20190219113758* and run on iOS.
- Test the logic: press "app --> webview" button, press "webview -> app" button, clear the event of the webview with the button "clear events".
- This produces the error "[ERROR] Error firing event 'app:deleteWebviewEvents': A JavaScript exception occurred "
- Retry with SDK 7.5.1GA, in this case there are no problems. The event is deleted, and the button "app --> webview" it doesn't call anything anymore.
Attachments
File | Date | Size |
---|---|---|
app.js | 2019-02-27T16:21:56.000+0000 | 805 |
Schermata 2019-02-27 alle 17.19.35.png | 2019-02-27T16:19:47.000+0000 | 27545 |
webview.html | 2019-02-27T16:22:00.000+0000 | 1109 |
Hello [~nicolomonili], I was able to reproduce the issue with SDK 8.0.0.v20190219113758 in iOS. The same code works without error in SDK 7.5.1.GA. Moving to TIMOB. Thanks.
PR(8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10746 PR(master): https://github.com/appcelerator/titanium_mobile/pull/10747
Verified the fix on SDK 8.1.0.v20190306084706 and 8.0.0.v20190306054146. Works fine. closing.