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.

TypeError: Failed to execute'getComputedStyle'on'Window': parameter 1 is parameter

See original GitHub issue

CodePen demo

https://codepen.io/pen?template=wGqJEz

Steps to reproduce the problem

  1. electron-nuxt-element.zip
  2. element-ui-issues
  3. Installation

wget https://github.com/ElemeFE/element/files/2234482/electron-nuxt-element.zip
unzip electron-nuxt-element.zip
cd electron-nuxt-element
npm i
npm run dev

What is the expected behavior?

Can window.getComputedStyle be changed to element.getRootNode().defaultView.getComputedStyle

What went wrong?

Document element will be wrong when used in different windows

Any other comments?

Window uses element.getRootNode().defaultView, I also expect that not all popup layers are inserted into the root body, but there is an optional insertion point.

bug-demo

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
FezVrastacommented, Aug 10, 2018

Feel free to send a PR with a fix please.

0reactions
yuchonghuacommented, Aug 11, 2018

I simply did a mobile div test and found that ddv-multi-window and popper.js are normal. I temporarily close #issues-665 and do a further test element-ui-vue-popper Thanks to FezVrasta, I am bothering you, sorry.


nuxt-popper-simplify.zip



wget https://github.com/FezVrasta/popper.js/files/2279931/nuxt-popper-simplify.zip
unzip nuxt-popper-simplify.zip
cd nuxt-popper-simplify
npm i
npm run dev


run-demo


run-demo

/ping @jikkai @ziyoung

Read more comments on GitHub >

github_iconTop Results From Across the Web

JS: Failed to execute 'getComputedStyle' on 'Window ...
In short: I am trying to understand the meaning of this TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of...
Read more >
Failed to execute 'getComputedStyle' on 'Window' - OutSystems
On my mobile app i am getting an Error on every page which says "Failed to execute 'getComputedStyle' on 'Window': parameter 1 is...
Read more >
parameter 1 is not of type 'Element'. HELP : r/learnjavascript
Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. HELP. Hi,. I'm trying to make a game to test...
Read more >
Failed to execute 'getComputedStyle' on 'Window': param 1 is ...
I'm trying to use your library but I'm getting an error: Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is ...
Read more >
Uncaught TypeError: Failed to execute ... - GreenSock
Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
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