skyglobal / web-toolkit

[DEPRECATED] Please use sky-uk/toolkit
https://github.com/sky-uk/toolkit
BSD 3-Clause "New" or "Revised" License
24 stars 35 forks source link

Lightbox doesn't close upon hashchange to previous state where lightbox wasn't open #295

Open jameshopkins opened 10 years ago

jameshopkins commented 10 years ago

Once a user opens a lightbox, and they click the browser's 'back' button (which changes the URL hash to the previous state), the lightbox doesn't close too.

peter-mouland commented 10 years ago

the opening and closing is handled by the hash-manager on line 93. I reckon if you add a new config option, passing a third option to the hash.register would probably do what you want it to. A good chance to split this out into its own component..

drop us a mail or come over to sky news if you want to pair.