elm-dialog icon indicating copy to clipboard operation
elm-dialog copied to clipboard

Clicking outside the dialog box or on Esc should close it as with X

Open Zimmi48 opened this issue 9 years ago • 4 comments

Hello, I don't know how difficult it would be to add this feature and your dialog component is already great without it but if that's not too complicated that would be great because this is the most standard behavior of dialogs on the web. Thanks!

PS: your README says the license is MIT but your elm-package.json says it is BSD3. These two licenses are quite close but it would be more consistent to mention only one. I suppose this small inconsistency comes from BSD3 being the default license when creating a new package.

Zimmi48 avatar Jun 06 '16 14:06 Zimmi48

Oh, good idea. I've just published v3.0.1, which takes care of the mouse click. If you've defined a closeMessage, clicking away will close the modal. (If you haven't, that's how you make dialogs that must be explicitly acknowledged.)

No escape-key support yet though...watch this space or feel free to PR. :-)

(And thanks for the note about the license. Also now fixed. I'd actually never taken in that field in elm-package.json. :-D )

krisajenkins avatar Jun 06 '16 20:06 krisajenkins

I was excited to test it but I see that you are delaying the feature because of bugs. Thanks anyway, and let me know when this gets any update. ;-)

Zimmi48 avatar Jun 07 '16 14:06 Zimmi48

@krisajenkins Hi! Thank for the great widget!! You write that if I specify closeMessage, then clicking away should close the modal, but it doesn't happen in my case. Could you think of any reason for it?

wwwater avatar Jun 03 '18 16:06 wwwater

This also wasn't working for me, and after looking through where closeMessage was used, I didn't see how it could. I've made a PR though that's working locally for me.

jesse-c avatar Jun 12 '18 14:06 jesse-c