Skip to content

Commit 8499dc4

Browse files
committed
Merge branch 'master' of https://github.com/kyoto/intro.js into kyoto-master
2 parents 6a8663e + d654af7 commit 8499dc4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

intro.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
prevLabel: '← Back',
3535
skipLabel: 'Skip',
3636
doneLabel: 'Done',
37-
tooltipPosition: 'bottom'
37+
tooltipPosition: 'bottom',
38+
exitOnEsc: true,
39+
exitOnOverlayClick: true
3840
};
3941
}
4042

@@ -96,7 +98,7 @@
9698
nextStepButton = targetElm.querySelector('.introjs-nextbutton');
9799

98100
self._onKeyDown = function(e) {
99-
if (e.keyCode === 27) {
101+
if (e.keyCode === 27 && self._options.exitOnEsc) {
100102
//escape key pressed, exit the intro
101103
_exitIntro.call(self, targetElm);
102104
} else if(e.keyCode === 37) {
@@ -530,7 +532,9 @@
530532
targetElm.appendChild(overlayLayer);
531533

532534
overlayLayer.onclick = function() {
533-
_exitIntro.call(self, targetElm);
535+
if(self._options.exitOnOverlayClick) {
536+
_exitIntro.call(self, targetElm);
537+
}
534538
};
535539

536540
setTimeout(function() {

0 commit comments

Comments
 (0)