GoogleChrome / dialog-polyfill

Polyfill for the HTML dialog element
BSD 3-Clause "New" or "Revised" License
2.45k stars 245 forks source link

Firefox modal isn't #193

Closed ghost closed 4 years ago

ghost commented 4 years ago

For Firefox .showModal shows the dialog but there is nothing modal about it. I can still mouseover and click elements on the underlying page. It doesn't even appear to use .backdrop.

It would also appear the form method="dialog" is not handled, either.

For Edge the size of the dialog is ridiculous. Kinda makes .backdrop pointless if the dialog is going to be the size of the entire window.

ghost commented 4 years ago

My mistake. Oddly, the above is true if dom.dialog_element.enabled is set to true for Firefox. If it is set for the default value of false then the polyfill works quite well. Hmmm.

samthor commented 4 years ago

I don't know the state of Firefox's native implementation. I don't think it works, but perhaps the detection code fires, so this polyfill doesn't load itself.

Edge is perhaps in a similar boat. Edgium should now natively support <dialog>, but older Edge and IE had problems with -fit-content which is used to display the dialog.

jhackett1 commented 4 years ago

i'm having the same issues in firefox but dom.dialog_element.enabled is off for me.

none23 commented 4 years ago

I'm facing the same problem using Firefox 75 on linux. Modal looks fine, but doesn't trap focus. Reproducible on the demo page

samthor commented 4 years ago

so I can't repro this here with Firefox 75 on my Mac.

With the caveat that the demo page @none23 you've linked to is quite old. I'm going to ask @agektmr to take it down and I'll stop linking to it.

samthor commented 4 years ago

We've added new demos. This was never reproducible; please open again if the new demos still have problems!