Material-ui: [Tooltip] - PopperProps broken starting from 4.9.5

Created on 13 Mar 2020  路  2Comments  路  Source: mui-org/material-ui

Because of #19851, we are not able to create our own custom arrow for a Tooltip.
image

  • [x] The issue is present in the latest release.
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸

Passing an arrow modifier to PopperProps, throws Failed to execute 'contains' on 'Node': parameter 1 is not of type 'Node'.

Expected Behavior 馃

The arrow is displayed properly.

Steps to Reproduce 馃暪

Working version (4.9.4): https://codesandbox.io/s/material-demo-ltrt5
Broken version (4.9.5): https://codesandbox.io/s/material-demo-ddi25

Root cause

This is because deepmerge() replaces DOM nodes by {} objects.

Here a screenshot of the following console.log:

image
image

Your Environment 馃寧

| Tech | Version |
| ----------- | ------- |
| Material-UI | v4.9.5 |
| React | v16.13.0
| Browser | Brave Version 1.3.118 Chromium: 80.0.3987.116 (Official Build) (64-bit) |

bug 馃悰 Tooltip

Most helpful comment

Should I create a PR to prevent deepMerge from merging Elements?

All 2 comments

It looks like it's actually attempting to merge the Elements. We probably just want to merge plain objects.

Should I create a PR to prevent deepMerge from merging Elements?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pola88 picture pola88  路  3Comments

reflog picture reflog  路  3Comments

mb-copart picture mb-copart  路  3Comments

revskill10 picture revskill10  路  3Comments

mattmiddlesworth picture mattmiddlesworth  路  3Comments