diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2009-11-13 06:42:15 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2009-11-13 06:42:15 +0000 |
commit | e081b8ec254ebaaa4773f04a0b23bd518b4e72ca (patch) | |
tree | 1b96223a2193a5d5449d0e2e14dab5d5dacb50b7 /src/com/vaadin/ui/LoginForm.java | |
parent | 32b0d04ed1cedd80fcafb9a1a9196c5a36a9708c (diff) | |
download | vaadin-framework-e081b8ec254ebaaa4773f04a0b23bd518b4e72ca.tar.gz vaadin-framework-e081b8ec254ebaaa4773f04a0b23bd518b4e72ca.zip |
fixes #3704
svn changeset:9765/svn branch:6.2
Diffstat (limited to 'src/com/vaadin/ui/LoginForm.java')
-rw-r--r-- | src/com/vaadin/ui/LoginForm.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/vaadin/ui/LoginForm.java b/src/com/vaadin/ui/LoginForm.java index 33ee670f4b..76c567dc5e 100644 --- a/src/com/vaadin/ui/LoginForm.java +++ b/src/com/vaadin/ui/LoginForm.java @@ -161,12 +161,14 @@ public class LoginForm extends CustomComponent { + "document.getElementsByTagName('head')[0].appendChild(stylesheet);\n" + "}" + "}\n" + + "function submitOnEnter(e) { var keycode = e.keyCode || e.which;" + + " if (keycode == 13) {document.forms[0].submit();} } \n" + "</script>" + "</head><body onload='setTarget();' style='margin:0;padding:0; background:transparent;' class=\"v-generated-body\">" + "<div class='v-app v-app-loginpage' style=\"background:transparent;\">" + "<iframe name='logintarget' style='width:0;height:0;" + "border:0;margin:0;padding:0;'></iframe>" - + "<form id='loginf' target='logintarget'>" + + "<form id='loginf' target='logintarget' onkeypress=\"submitOnEnter(event)\">" + "<div>Username</div><div >" + "<input class='v-textfield' style='display:block;' type='text' name='username'></div>" + "<div>Password</div>" |