Mercurial > hg > webaudioevaluationtool
changeset 277:724f72092fa7 Dev_main
Feature #1302: Enter keys not captured if current focus is a textarea (enter may be carriage return, want to capture that not jump to next).
author | Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk> |
---|---|
date | Thu, 23 Jul 2015 11:14:32 +0100 |
parents | c460da44996b |
children | 8020152a36af 38f2df7badda |
files | core.js |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core.js Thu Jul 23 11:10:36 2015 +0100 +++ b/core.js Thu Jul 23 11:14:32 2015 +0100 @@ -109,6 +109,12 @@ if (e.keyCode == 13 && popup.popup.style.visibility == 'visible') { // Enter key pressed + var textarea = $(popup.popupContent).find('textarea'); + if (textarea.length != 0) + { + if (textarea[0] == document.activeElement) + {return;} + } popup.buttonProceed.onclick(); } });