Beware that a generic JS hook to submit the form on Enter keypress may interfere with controls that are designed to consume Enter, like textarea [very bad]. This may also interfere with plugins that customize the behavior of Enter [bad for unknown subset of plugins]. Finally, hooking forms during onload will miss form elements that are injected into the DOM after onload [bad since it creates inconsistencies in form handling].
Is the goal here to really make it so enter-on-submit is the default for all forms? Clicking Enter on the Jenkins Job Configure form does not auto-submit for me on Chrome....why is that the desirable behavior on IE9?
If something in the Jenkins DOM or default JS scripts is interfering with the standard IE 9 Enter key behavior then finding the root cause of that to restore standard behavior generically seems like logical fix. However, if this is intended to change the default form-handling behavior of IE, then isolating this change to specific forms where submit-on-enter is specifically known to be highly desirable and non-breaking seems more appropriate (for example, the login form).
Beware that a generic JS hook to submit the form on Enter keypress may interfere with controls that are designed to consume Enter, like textarea [very bad]. This may also interfere with plugins that customize the behavior of Enter [bad for unknown subset of plugins]. Finally, hooking forms during onload will miss form elements that are injected into the DOM after onload [bad since it creates inconsistencies in form handling].
Is the goal here to really make it so enter-on-submit is the default for all forms? Clicking Enter on the Jenkins Job Configure form does not auto-submit for me on Chrome....why is that the desirable behavior on IE9?
If something in the Jenkins DOM or default JS scripts is interfering with the standard IE 9 Enter key behavior then finding the root cause of that to restore standard behavior generically seems like logical fix. However, if this is intended to change the default form-handling behavior of IE, then isolating this change to specific forms where submit-on-enter is specifically known to be highly desirable and non-breaking seems more appropriate (for example, the login form).