fixes for opening with js
Merge pull request #3769 from glorpen/revealfix

Reveal - opening and creating within JS