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

Most recent version 4.2.14 breaks IE11 #677

Closed
yc-yvonne opened this issue Feb 26, 2021 · 9 comments · Fixed by #706
Closed

Most recent version 4.2.14 breaks IE11 #677

yc-yvonne opened this issue Feb 26, 2021 · 9 comments · Fixed by #706

Comments

@yc-yvonne
Copy link

yc-yvonne commented Feb 26, 2021

Likely from this: #668

Causes a Internet Explorer throws SCRIPT5022: HierarchyRequestError in IE11

Method of injection is not supported

@yc-yvonne yc-yvonne changed the title Most recent version breaks IE11 Most recent version 4.2.14 breaks IE11 Feb 26, 2021
@tiagomsg
Copy link

tiagomsg commented Mar 2, 2021

Have the same issue, it's definitely due to #668.

parentNode.constructor.name returns undefined on IE11, that causes this switch to assume the domRoot is the parentNode instead of parentNode.head.

Think the fix would be to just change that switch to:

    switch (parentNode.constructor.name) {
      case 'ShadowRoot':
        domRoot = parentNode;
        break;
      case 'HTMLDocument':
      default:
        domRoot = parentNode.head;
        break;
    }

But not entirely sure if this is safe or if it'll break something else.

@kraMaddi
Copy link

kraMaddi commented Mar 2, 2021

Getting the same issue for safari as well.
hierarchyrequesterror: the operation would yield an incorrect node tree.
The older version works fine

gjvoosten added a commit to NCI-Agency/anet that referenced this issue Mar 4, 2021
@geoffharcourt
Copy link

We're seeing this issue in all of our Jest tests that use components with react-tooltip. I'm not sure yet if it's Jest itself or jsdom, but we this is the trace we see:


console.error
--
  | Error: Uncaught [HierarchyRequestError: Invalid insertion of STYLE node in #document node.]
  | at reportException (/app/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:62:24)
  | at innerInvokeEventListeners (/app/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:333:9)
  | at invokeEventListeners (/app/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:274:3)
  | at HTMLUnknownElementImpl._dispatch (/app/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:221:9)
  | at HTMLUnknownElementImpl.dispatchEvent (/app/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:94:17)
  | at HTMLUnknownElement.dispatchEvent (/app/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:231:34)
  | at Object.invokeGuardedCallbackDev (/app/node_modules/react-dom/cjs/react-dom.development.js:237:16)
  | at invokeGuardedCallback (/app/node_modules/react-dom/cjs/react-dom.development.js:292:31)
  | at commitRootImpl (/app/node_modules/react-dom/cjs/react-dom.development.js:22541:9)
  | at unstable_runWithPriority (/app/node_modules/scheduler/cjs/scheduler.development.js:653:12) DOMException {}
  |  
  | at VirtualConsole.<anonymous> (node_modules/jsdom/lib/jsdom/virtual-console.js:29:45)
  | at reportException (node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:28)
  | at innerInvokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:333:9)
  | at invokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:274:3)
  | at HTMLUnknownElementImpl._dispatch (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:221:9)
  | at HTMLUnknownElementImpl.dispatchEvent (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:94:17)

@KumarSumitD
Copy link

KumarSumitD commented Mar 27, 2021

We are also getting the same error on IE11. Is reverting to 4.2.13 fixes the issue ?

@rossettistone
Copy link

@KumarSumitD Reverting to 4.2.13 resolved the issue for us.

@handofthecode
Copy link

HierarchyRequestError: The operation would yield an incorrect node tree.
Safari: 14.0.3
react-tooltip: 4.2.17

@dworzycp
Copy link

Same issue here in 4.2.17

@ruMoonGuard
Copy link

Same issue here in 4.2.19

@rscotten
Copy link

Confirmed that reverting back to 4.2.13 resolves the issue.

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

Successfully merging a pull request may close this issue.

10 participants