Skip to content

Console error and broken page after opening multiple action menus in table or at-mention in rich-text-editor [Firefox only] #2744

@jattasNI

Description

@jattasNI

🐛 Bug Report

If I click around to open and close multiple action items in the Nimble table, after a few clicks I see a JS error in the browser console and the page stops working.

💻 Repro or Code Sample

  1. Open the table story in storybook
  2. Open the action menu on one row
  3. Close it either by clicking the menu button or clicking elsewhere in the table
  4. Open the action menu on a different row and close it
  5. Try to open the first action menu again

🤔 Expected Behavior

The action menu opens

😯 Current Behavior

The action menu doesn't open, some row content disappears, and an error appears in the console.

firefox.table.action.menu.mov
Uncaught TypeError: can't access property "insertBefore", node.parentNode is null
    insertBefore https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:82139
    updateContentTarget https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:81790
    handleChange https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:81934
    notify https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:81312
    call https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:81493
    tryRunTask https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:81049
    process2 https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:81059
    enqueue https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:81073
    tryReflectToAttribute https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:82636
    setValue https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:82606
    set https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:81574
    checkedChanged https://nimble.ni.dev/storybook/assets/form-associated-Br3tIWZA.js:345
    checkedChanged https://nimble.ni.dev/storybook/assets/switch-eaWEFoHN.js:48
    setValue https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:81420
    set https://nimble.ni.dev/storybook/assets/iframe-BsQQIFs0.js:81574
    clickHandler https://nimble.ni.dev/storybook/assets/switch-eaWEFoHN.js:39
...

💁 Possible Solution

🔦 Context

I reproduced this in SystemLink in the locations app, trying to add multiple locations in succession using action menus.

🌍 Your Environment

MacOS Firefox 144.0.2 (aarch64). Molly also reproduced in Windows Firefox.
This doesn't reproduce in Edge or Safari

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions