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.

ERROR TypeError: Cannot read property 'addEventListener' of undefined

See original GitHub issue

The error appears on line 91: AngularMultiSelect.prototype.ngAfterViewInit = function () { this._elementRef.nativeElement.getElementsByClassName("lazyContainer")[0].addEventListener('scroll', this.onScroll.bind(this)); };

From this file: /node_modules/angular2-multiselect-dropdown/multiselect.component.js

Version: 2.3.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
CuppaLabscommented, Jan 26, 2018

fixed

0reactions
cooljeffrocommented, May 18, 2018

I am still experiencing this issue when using both the lazyLoading and groupBy options.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'addEventListener' of null - Stack Overflow
In my case the trigger for the error was hitting enter or reload for the page and then changing the tab to another...
Read more >
Cannot read property 'addEventListener' of Null in JS
The "Cannot read property addEventListener of null" error occurs when trying to call the addEventListener() method on an element that isn't present in...
Read more >
[SOLVED] Cannot Read Property 'addEventListener' of Null in ...
To fix the “cannot read property 'addEventListener' of null” error, make sure the selector used the access the element is properly defined.
Read more >
Cannot read property 'addEventListener' of undefined?
Uncaught TypeError : Cannot read property 'addEventListener' of undefined. Kindly help me. Twentysixteen child theme – menu – Cannot read property ...
Read more >
Cannot read property 'addEventListener' of null - JavaScript
I'm working on this simple ToDo list script but get the following error: “Uncaught TypeError: Cannot read property 'addEventListener' 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