digdir / designsystemet

Designsystemet
https://designsystemet.no
MIT License
72 stars 35 forks source link

Minor `Modal` bugs #1116

Closed Barsnes closed 9 months ago

Barsnes commented 9 months ago

Description of the bug

The onInteractOutside callback is called when you click at the top or bottom of the dialog element. This happens because we have added padding to it, and we are listening for click events on dialog. Best solution is probably to use a wrapper div inside, and add the padding there, since we can't listen for events on a pseudo element

There are occurrences of autoFocus not working. This needs further investigation

Steps To Reproduce

  1. Use the modal

Additional Information

image

Barsnes commented 9 months ago

When console logging the element that is active after modal is opened, I get this

image
Albertlarsen commented 9 months ago

I fixed the onInteractOutside bug in task #1156

Barsnes commented 9 months ago

Modal autoFocus issue will be continued in #1177