Mercurial > hg > webaudioevaluationtool
changeset 1539:1d80719b81de
Feature #1302: Enter key bounded to button proceed of popup. Only triggered if popup is visible. All enter codes are captured though.
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Thu, 23 Jul 2015 11:10:36 +0100 |
parents | b9546c7f809e |
children | 1f233975e76c |
files | core.js |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core.js Thu Jul 23 10:58:08 2015 +0100 +++ b/core.js Thu Jul 23 11:10:36 2015 +0100 @@ -105,6 +105,13 @@ var blank = document.getElementsByClassName('testHalt')[0]; blank.style.zIndex = 2; blank.style.visibility = 'visible'; + $(window).keypress(function(e){ + if (e.keyCode == 13 && popup.popup.style.visibility == 'visible') + { + // Enter key pressed + popup.buttonProceed.onclick(); + } + }); }; this.hidePopup = function(){