File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
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 ) {
520
522
521
523
targetElm . appendChild ( overlayLayer ) ;
522
524
523
- overlayLayer . onclick = function ( ) {
524
- _exitIntro . call ( self , targetElm ) ;
525
- } ;
525
+ if ( this . _options . exitOnOverlayClick ) {
526
+ overlayLayer . onclick = function ( ) {
527
+ _exitIntro . call ( self , targetElm ) ;
528
+ } ;
529
+ }
526
530
527
531
setTimeout ( function ( ) {
528
532
styleText += 'opacity: .5;' ;
You can’t perform that action at this time.
0 commit comments