Skip to content

Commit

Permalink
issue/34 Fixed unexpected course exit
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster authored Mar 10, 2021
2 parents 63795fe + 57a8689 commit aa8e471
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "git://github.com/cgkineo/adapt-pageIncompletePrompt"
},
"version": "2.1.0",
"version": "2.1.1",
"framework": ">=3.3",
"homepage": "https://github.com/cgkineo/adapt-pageIncompletePrompt",
"issues": "https://github.com/cgkineo/adapt-pageIncompletePrompt/issues/",
Expand Down
10 changes: 6 additions & 4 deletions js/adapt-pageIncompletePrompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ define([
onRouterNavigate: function(routeArguments) {
if (!this.isEnabled() || this.pageModel.get('_isComplete')) return;

this.href = window.location.href;
this.href = /#/.test(window.location.href) ?
window.location.href :
window.location.href + '#';

var id = routeArguments[0];
if (id) {
Expand All @@ -109,8 +111,8 @@ define([

onAccessibilityToggle: function() {
if (Adapt.device.touch) {
//accessibility is always on for touch devices
//ignore toggle
// accessibility is always on for touch devices
// ignore toggle
this._ignoreAccessibilityNavigation = false;
return;
}
Expand All @@ -126,7 +128,7 @@ define([
_classes: 'is-pageincompleteprompt ' + (this.model._classes || ''),
_prompts: [{
promptText: this.model._buttons.yes,
_callbackEvent: 'pageIncompletePrompt:leavePage',
_callbackEvent: 'pageIncompletePrompt:leavePage'
}, {
promptText: this.model._buttons.no,
_callbackEvent: 'pageIncompletePrompt:cancel'
Expand Down

0 comments on commit aa8e471

Please sign in to comment.