GoogleChromeLabs / ProjectVisBug

FireBug for designers › Edit any webpage, in any state https://a.nerdy.dev/gimme-visbug
https://visbug.web.app
Apache License 2.0
5.41k stars 284 forks source link

/zindex not working in Firefox #539

Closed hchiam closed 2 years ago

hchiam commented 2 years ago

I'm getting Uncaught TypeError: el.computedStyleMap is not a function. from zindex.js https://caniuse.com/?search=computedStyleMap

Falling back on window.getComputedStyle might help, and has better browser support: https://caniuse.com/?search=getComputedStyle

We could replace:

el.computedStyleMap().get('z-index').value

with

window.getComputedStyle(el).getPropertyValue('z-index')