Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Cannot read property 'ev' of null #10186

Closed
dylanvdmerwe opened this issue Jan 26, 2017 · 6 comments
Closed

bug: Cannot read property 'ev' of null #10186

dylanvdmerwe opened this issue Jan 26, 2017 · 6 comments
Milestone

Comments

@dylanvdmerwe
Copy link
Contributor

Ionic version: (check one with "x")
[ ] 1.x
[x] 2.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
I upgraded a project from RC4 to 2.0.0. When running the project, I get shown the following error:

image

Note that if this error is dismissed, the application continues to function as normal.

Expected behavior:
Error to be fixed.

Other information:
As discussed with @manucorporat:

so
https://github.com/driftyco/ionic/blob/3a718de4632427cdf1a44e066bb559a6c28c6733/src/components/content/content.ts#L620
this function is called after the content has been destroyed
it is huge complicated function
we could fix it by doing:
if(!this.scroll) return; 
but it is a bad fix, since it does not fix the root of the cause
that function should not be called a tall

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.5.0
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.0
ios-sim version: 5.0.10
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.2.1 Build version 8C1002
@dylanvdmerwe
Copy link
Contributor Author

dylanvdmerwe commented Jan 26, 2017

In ionViewDidLoad of the rootPage, I was setting a variable that hides the ion-menu.

<ion-menu *ngIf="showMenu"

Moving the logic to ionViewWillEnter fixes this. But this is still a workaround as the code worked fine in RC4.

@dtalay
Copy link

dtalay commented Jan 26, 2017

I encountered this problem in a modal view. I had the same problems with ionViewDidLoad getting navParams. Putting it inro ionViewWillEnter solved the problem but the scroll is still messed up. I moved it to constructor and worked perfectly. Please submit this as a bug report. Thanks

@brandyscarney
Copy link
Member

A fix for this will be in the next release. Can you please try out the following nightly and let me know if you find any issues:

npm install --save --save-exact [email protected]

Thanks!

@chanoch
Copy link

chanoch commented Feb 8, 2017

Brandy's fix worked for me.

@leonardopaiva
Copy link

leonardopaiva commented Feb 22, 2018

thanks,

i had a similar problem trying to use this.content.scrollToBottom(), so i checked the line where says the error log, it was leading to content.js core file, i was getting the error because this._scroll was null, so i checked it first before using on my component

if(this.content._scroll) {
}

its working for now, but i am not sure if this is a good work around. Hope that helps someone.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 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.

@ionitron-bot ionitron-bot bot unassigned jgw96 Sep 1, 2018
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants