Post

✅ Nice lil btn scale-down 🙈 Layout change bc the scroll bar disappears 🙈 No light dismiss These UX problems can easily be solved with: - closedby="any" - overscroll-behavior: contain

8 reposts68 likes

Wouldn’t it be annoying if you accidentally close the dialog due to light dismiss while you were writing a banger post? 😄 Maybe only light dismiss when there’s nothing typed yet. Is there CSS to check if all inputs are empty? Or it keeps its content when reopened but that’s another UX discussion

Twitter handles this! When nothing is typed, light dismiss. When there’s content, and the user clicks outside of the dialog or hits esc (ie. triggers light dismiss), prompt to save. I would update the behavior on input

Also a light dismissible dialog preserves the form content fyi if you don’t submit it (updated my demo to add an input show that)

Thanks that makes sense since the form is still in the DOM I guess. I really like the new possibilities and features but sometimes it makes state management confusing in combination with frameworks. Especially since those frameworks often want to manage the input instead of only taking it on submit