ericmmartin / simplemodal

A modal dialog framework for jQuery
http://simplemodal.com/
Other
507 stars 229 forks source link

New option for simplemodal #1

Closed nicholasbs closed 8 years ago

nicholasbs commented 13 years ago

Hi,

I wanted to allow any keypress to close my dialog, so I added a new option (anykeyClose, false by default) to simplemodal.

Thanks for an awesome library! It's just what I was looking for and only took a minute to get working.

Best, -Nick

ericmmartin commented 13 years ago

Thanks Nicholas. I'm not sure that there are enough situations to warrant this change - do you have a use case?

nicholasbs commented 13 years ago

My use case was for Hackruiter.com. If you press ? on the frontpage, you'll get a modal dialog with keyboard shortcuts, and I wanted any key press to close the help window.

In general, I think any time you want to have modal display of info/help but make it hard for the user to get caught in it, having any key to close is useful. I've definitely seen other sites that have used this behavior on, but I can't think of them off the top of my head.

Best, -Nick

JohnSThomas commented 8 years ago

Closing, out dated and as @ericmmartin stated, there aren't enough use cases for this.