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

Error: “Cannot read property 'style' of null” when going back from a page with the hardware back button where opening the keyboard has triggered the page to scroll #9278

Closed
infinnie opened this issue Nov 22, 2016 · 8 comments
Milestone

Comments

@infinnie
Copy link

infinnie commented Nov 22, 2016

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:

If the page has to scroll to make the current form field visible when opening the keyboard, then when dismissing the keyboard and popping the page with the hardware back button, an error would be thrown that goes: “Cannot read property 'style' of null.”

Expected behavior:

No error would be thrown.

@infinnie infinnie changed the title Cannot read property 'style' of null when going back from a page with the hardware back button where opening the keyboard has triggered the page to scroll Error: “Cannot read property 'style' of null” when going back from a page with the hardware back button where opening the keyboard has triggered the page to scroll Nov 22, 2016
@Artfloriani
Copy link
Contributor

Having the same error after updating to Ionic RC-3

@jgw96
Copy link
Contributor

jgw96 commented Nov 23, 2016

Hello all! Thanks for opening an issue with us. We are currently making alot of improvements around input scrolling which should fix this issue. I am testing these changes as we speak and will update this issue with my findings.

@jgw96 jgw96 self-assigned this Nov 23, 2016
@Manduro
Copy link
Contributor

Manduro commented Dec 6, 2016

Related or same: #9310

I'm still seeing these errors using the latest nightly 2.0.0-rc.3-201612021933, so the recent scroll changes haven't fixed this.

@Manduro
Copy link
Contributor

Manduro commented Dec 6, 2016

@adamdbradley Thanks! I'm not sure if this fixes all cases of this error though. I've logged the following ones:

TypeError: null is not an object (evaluating 'this._scroll.scrollToBottom')
File ".../main.js" line 4 col 29595 in scrollToBottom

TypeError: null is not an object (evaluating 'this._scrollEle.style')
File ".../main.js" line 4 col 29911 in setScrollElementStyle

TypeError: null is not an object (evaluating 'this._scrollEle.style')
File ".../main.js" line 4 col 30395 in addScrollPadding

TypeError: Cannot read property 'style' of null
File ".../main.js" line 15025 col 28 in Content.addScrollPadding

TypeError: Cannot read property 'style' of null
File ".../main.js" line 4 col 20082 in e.setScrollElementStyle

TypeError: null is not an object (evaluating 'this._scroll.scrollToBottom')
File ".../main.js" line 4 col 19766 in scrollToBottom

@AltRoot17
Copy link

AltRoot17 commented Jan 3, 2018

any one know how to fix this? TypeError: Cannot read property 'style' of null

@mariohmol
Copy link

mariohmol commented Feb 2, 2018

@AltRoot17 i'm experiencing this with ionic3 and Item reorder TypeError: Cannot read property 'style' of undefined at ItemReorder._reorderMove (http://localhost:8100/build/main.js:71606:33) at ItemReorderGesture.onDragMove (http://localhost:8100/build/main.js:166579:38) .. in my case the problem was that i had two reorder="true" in same view.. after i fixed it .. worked

@girishnair12345
Copy link

This is causing the app to hang when its loaded for this first time. Any fixes on this

@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

9 participants