I'm trying to have the drawer close only when the user presses it's "X" button (at the moment it closes when pressing any button on the page or links within the drawer), but just can't seem to find the part of code that does the work. I'm not using the framework, instead I was using the Authoring Tool for basic course construction and then exported the course for further functional alterations.
Any help is greatly appreciated!
The code to close the drawer when you click outside of it is here.
The code to close it when you press the Esc key is here.
As for closing when you click on a button within the drawer - that's controlled by whatever extension is in the drawer at that time.
So adapt-contrib-resources doesn't close the drawer when one of its items is clicked - but adapt-contrib-pageLevelProgress does.
Hope this helps
Thanks for a quick reply! It was a long day at work yesterday so I completely forgot to mention, but I've already removed the "white-shadow" from the screen, so the part of code that causes drawer to close when clicking on the shadow is already obsolete. I am however, using the quick navigation plug-in, that places Back/Next/Home buttons at the bottom of the screen allowing the user to quickly move between different pages, so whenever I press the next button for example, and move onto the next page the drawer closes - this is something I have to prevent from happening. If you have any ideas on solving this issue please let me know!
The plug-in I'm talking about is here: https://github.com/cgkineo/adapt-quicknav
Actually nevermind. I fogured it out! :)
It was because of this line:
this.listenTo(e, "remove", this.onCloseDrawer);