You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.
@ionic/angular 4.0.0-beta13
Describe the Bug
When using cordova browser, util/util.js proxyEvent fails when on resume event is fired.
util.js:10 Uncaught TypeError: Cannot read property 'detail' of undefined
at Channel.<anonymous> (util.js:10)
at Channel.fire (cordova.js:798)
at HTMLDocument.<anonymous> (cordova.js:1508)
@manucorporat made changes to util.js, adding support for back button event and it is missing the check if event isn't undefined/null, which for some reasons is the case for on resume. So the fix is very simple:
export function proxyEvent<T>(emitter: EventEmitter<T>, el: EventTarget, eventName: string) {
el.addEventListener(eventName, (ev) => {
emitter.emit(ev ? (ev as any).detail as T : undefined);
});
}
Steps to Reproduce
Steps to reproduce the behavior:
Load the web app, which uses cordova browser
open another tab
go back to the tab with the web app - the error is thrown
Expected Behavior
No error obviously.
The text was updated successfully, but these errors were encountered:
MarkChrisLevy
changed the title
On cordova resume event, angular/src/util/util.js fails
[v4 beta-13] On cordova resume event, angular/src/util/util.js fails
Oct 15, 2018
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Bug Report
Ionic Info
Run
ionic info
from a terminal/cmd prompt and paste the output below.Describe the Bug
When using cordova browser, util/util.js proxyEvent fails when on resume event is fired.
@manucorporat made changes to util.js, adding support for back button event and it is missing the check if event isn't undefined/null, which for some reasons is the case for on resume. So the fix is very simple:
Steps to Reproduce
Steps to reproduce the behavior:
Expected Behavior
No error obviously.
The text was updated successfully, but these errors were encountered: