Skip to content

Commit

Permalink
Merge pull request #3 from smart-components/escToBackspace
Browse files Browse the repository at this point in the history
Bug 1238870 - Backspace key for back function r=@luke-chang
  • Loading branch information
rickychien committed Jan 14, 2016
2 parents 8910d99 + 711a714 commit a18be5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Expand Up @@ -96,9 +96,9 @@ window.SmartDialog = (function(win) {
}
break;
case 'keyup':
// close dialog when ESC is clicked
// close dialog when Backspace is clicked
if (this.getAttribute('esc-close') != 'false' &&
(evt.keyCode === 27 || evt.key === 'Esc') &&
evt.keyCode === KeyEvent.DOM_VK_BACK_SPACE &&
this.classList.contains('opened')) {
this.close();
}
Expand Down

0 comments on commit a18be5a

Please sign in to comment.