nrkno / core-components

Accessible and lightweight Javascript components
https://static.nrk.no/core-components/latest/
MIT License
117 stars 10 forks source link

core-dialog: both dialog and backdrop gets z-index: 0 and fails to show above content #454

Closed eriksalhus closed 4 years ago

eriksalhus commented 4 years ago

Looks like core-dialog is not working properly in Safari 12. Seems as though both elements gets z-index: 0.

let zIndex = window.getComputedStyle(this).getPropertyValue('z-index') if (zIndex === 'auto' && this.style.zIndex === '') { // Place this dialog over uppermost dialog if not controlled in CSS or JS

Since zIndex is 0, my guess is that core-dialog should not update the z-index because it is set, and not to auto. Makes sense, but maybe it also makes sense to check if zIndex === '0'?

Caused by #445

eriksalhus commented 4 years ago

@htor Did you test core-dialog v3.0.6 on Safari 12? Looks like Safari 12 reports 0 when z-index is not set.

htor commented 4 years ago

takk for denne . du har rett vi burde sjekke zIndex === '0'. lager en pr på dette