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

Toast / EuiGlobalToastList - Uncaught TypeError: Cannot read property 'scrollTop' of null #1595

Closed
andrew-goldstein opened this issue Feb 26, 2019 · 1 comment
Assignees
Labels

Comments

@andrew-goldstein
Copy link

An Uncaught TypeError: Cannot read property 'scrollTop' of null in the EuiGlobalToastList component causes a "⚠️ Something went wrong error" in the Kibana SecOps app.

The TypeError can be reproduced in the Toast demo page via the following steps, as shown in the animated gif below:

cannot-read-property-scrolltop-of-null

  1. Visit the Toast demo page in Chrome
  2. Open the Chrome developer tools, and select the Console tab
  3. In rapid succession, click the Add toast to global toast list button 4-5 times
  4. Click on the Props tab

An Uncaught TypeError: Cannot read property 'scrollTop' of null is displayed, per the animated gif above.

Clicking on the line number in the Console indicates the following code in global_toast_list.js is the source of the issue:

  startScrollingToBottom() {
    this.isScrollingToBottom = true;

    const scrollToBottom = () => {
      const position = this.listElement.scrollTop; // <--Uncaught TypeError: Cannot read property 'scrollTop' of null
@snide
Copy link
Contributor

snide commented Feb 26, 2019

Verified on the docs side. Guessing that because the page size changes when the tab is switched, the calculation gets a bit screwy. @thompsongl if you have time this week, do you mind checking on this for Andrew? A related problem is blocking them on some sec ops work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants