Added javascript ehancement to fix off-canvas back button bug

This addresses the issues found in issue #323