Mercurial > hg > webaudioevaluationtool
diff core.js @ 785:c8f99418b34b
Bug #1490: Popup button 'enter' key grab only bound once. APE Multi-interface has default metric response if only one axis used.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Fri, 11 Dec 2015 11:42:28 +0000 |
parents | 28a7016bffde |
children | 9ed3abe54604 |
line wrap: on
line diff
--- a/core.js Fri Dec 11 11:19:11 2015 +0000 +++ b/core.js Fri Dec 11 11:42:28 2015 +0000 @@ -228,6 +228,13 @@ this.popupOptions = null; this.currentIndex = null; this.responses = null; + $(window).keypress(function(e){ + if (e.keyCode == 13 && popup.popup.style.visibility == 'visible') + { + console.log(e); + popup.buttonProceed.onclick(); + } + }); this.createPopup = function(){ // Create popup window interface @@ -305,12 +312,6 @@ 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') - { - popup.buttonProceed.onclick(); - } - }); }; this.hidePopup = function(){ @@ -320,7 +321,6 @@ blank.style.zIndex = -2; blank.style.visibility = 'hidden'; this.buttonPrevious.style.visibility = 'inherit'; - $(window).keypress(function(e){}); }; this.postNode = function() {