question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot set property 'scrollTop' of null

See original GitHub issue

Angular 2.4.8 Angular2-tree-component 3.1.0

Hi. After upgrading from 2.7.0 to 3.1.0 i got some issue. When i try to do this:

this.itemsTree.treeModel.getNodeById('abc').setActiveAndVisible(true);

i got error: “Cannot set property ‘scrollTop’ of null”

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
SnackyPetecommented, Mar 8, 2017

If you need a workaround until this gets sorted out, surround the “display” request with a setTimeout(). It’s working for me.

1reaction
dae721commented, May 25, 2017

Still happening for me with 3.7.2. Probably my situation is unique - the tree is within an *ngIf. It’s initially hidden until data is retrieved from our server and a manual change detection is called. @SnackyPete’s workaround to use a setTimeout works for me and I’m happy with that, but thought I’d mention it in case anyone else is still having this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react Cannot set property 'scrollTop' of undefined
I'm receiving the following error. How can I solve this issue. TypeError: Cannot set property 'scrollTop' of undefined ...
Read more >
Error in Tests [TypeError: Cannot read property 'scrollTop' of null]
Hi, I'm using the Tabs component and passing all the props that I require using my own wrapper component. Everything is working fine...
Read more >
Uncaught TypeError: Cannot read property 'scrollTop' of null
So, in Eureka, this code works fine: function close_and_reopen_UI_Page(). {. // Close this current pop-up UI page.
Read more >
js-error "Cannot read property 'scrollTop' of null" for gantt chart ...
js-error "Cannot read property 'scrollTop' of null" for gantt chart report.
Read more >
Troubleshooting - Material UI - MUI
Troubleshooting · Material UI v5 migration · Styles broken after migrating to v5 · Storybook and Emotion · Cannot read property scrollTop of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found