Pierre Lebrun commited on
Commit
4a0247e
·
1 Parent(s): 0b31fb7

Respect allowClose option when ESC key is pressed

Browse files
Files changed (1) hide show
  1. src/index.js +1 -1
src/index.js CHANGED
@@ -184,7 +184,7 @@ export default class Driver {
184
  }
185
 
186
  // If escape was pressed and it is allowed to click outside to close
187
- if (event.keyCode === ESC_KEY_CODE) {
188
  this.reset();
189
  return;
190
  }
 
184
  }
185
 
186
  // If escape was pressed and it is allowed to click outside to close
187
+ if (event.keyCode === ESC_KEY_CODE && this.options.allowClose) {
188
  this.reset();
189
  return;
190
  }