File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 34
34
prevLabel : '← Back' ,
35
35
skipLabel : 'Skip' ,
36
36
doneLabel : 'Done' ,
37
- tooltipPosition : 'bottom'
37
+ tooltipPosition : 'bottom' ,
38
+ exitOnEsc : true ,
39
+ exitOnOverlayClick : true
38
40
} ;
39
41
}
40
42
96
98
nextStepButton = targetElm . querySelector ( '.introjs-nextbutton' ) ;
97
99
98
100
self . _onKeyDown = function ( e ) {
99
- if ( e . keyCode === 27 ) {
101
+ if ( e . keyCode === 27 && self . _options . exitOnEsc ) {
100
102
//escape key pressed, exit the intro
101
103
_exitIntro . call ( self , targetElm ) ;
102
104
} else if ( e . keyCode === 37 ) {
530
532
targetElm . appendChild ( overlayLayer ) ;
531
533
532
534
overlayLayer . onclick = function ( ) {
533
- _exitIntro . call ( self , targetElm ) ;
535
+ if ( self . _options . exitOnOverlayClick ) {
536
+ _exitIntro . call ( self , targetElm ) ;
537
+ }
534
538
} ;
535
539
536
540
setTimeout ( function ( ) {
You can’t perform that action at this time.
0 commit comments