[TIMOB-27692] iOS: JQuery .unload function not working in WebView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2020-01-02T16:00:02.000+0000 |
Affected Version/s | Release 8.3.0 |
Fix Version/s | n/a |
Components | n/a |
Labels | engTriage |
Reporter | Riduanul Islam |
Assignee | Unknown |
Created | 2019-12-17T19:02:01.000+0000 |
Updated | 2020-01-02T16:00:02.000+0000 |
Description
Client has a webview component where they are running a page with some jQuery and javascript, they have noticed a discrepancy with iOS and android in that the unload function does not work for iOS webview.
$(window).unload(function () {
chat.server.send('[SYSTEM]', $('#displayname').val() + ' has left', $('#operatorid').val(), $('#convoID').val());
});
This is the specific jQuery line they're using.
They basically have a webview where the URL points to a page that's using javascript and jquery
and they want code to run in the .unload function.
it's not running for iOS webview but work for android.
[~rislam] could they provide a full sample showing their issue, the jquery snippet provided is not enough for us to debug this issue. Ideally we would like a full classic sample for this issue as it requires setting up the project with jquery etc At a glance though, I don't think this will be a titanium issue, we don't own the webview or jquery. I did a quick search for "jquery unload safari not working" and there's a lot of stackoverflow posts about this being unreliable cross platform.