From: hickert Date: Thu, 14 Oct 2010 14:52:50 +0000 (+0000) Subject: Updated keyPress handling in gosa.js X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5b18b77d2043577f3e311e634e10166e546b70bb;p=gosa.git Updated keyPress handling in gosa.js -If a button is selected and we press Enter then submit the button. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20046 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/include/gosa.js b/gosa-core/html/include/gosa.js index b282e5579..e78e88f6d 100644 --- a/gosa-core/html/include/gosa.js +++ b/gosa-core/html/include/gosa.js @@ -117,8 +117,14 @@ function keyHandler(DnEvents) { next_element = getNextInputElement(element); } - // If next element is of type submit, then submit the button else set focus - if(next_element!=null && next_element.type == 'submit'){ + if(element != null && element.type == 'submit'){ + + // If the current element is of type submit, then submit the button else set focus + element.click(); + return(false); + }else if(next_element!=null && next_element.type == 'submit'){ + + // If next element is of type submit, then submit the button else set focus next_element.click(); return(false); }else if(next_element){