rabble-rouser / Healthspek-WebSpeks

Healthspek Web Speks Developer's Guide and Quick-Start Template
0 stars 0 forks source link

Use browser Back button to close modal #13

Closed peterbee closed 10 years ago

peterbee commented 10 years ago

Especially for full-screen modals, this significantly increases usability.

peterbee commented 10 years ago

This may require setting a hash when the modal opens and then detecting when that hash is removed (which will occur when the Back button is pressed).

peterbee commented 10 years ago

Web Spek API now uses the the window location hash to observe the browser Back button being pressed. If a modal is open, it is closed when the Back button is pressed.