[Rt-commit] rt branch, 4.4/disable-submit-on-enter-in-autocomplete, created. rt-4.4.4-137-g1150362b5e
Blaine Motsinger
blaine at bestpractical.com
Fri Aug 28 20:47:39 EDT 2020
The branch, 4.4/disable-submit-on-enter-in-autocomplete has been created
at 1150362b5e1dea69a676c25cbece25e932ad64b8 (commit)
- Log -----------------------------------------------------------------
commit 1150362b5e1dea69a676c25cbece25e932ad64b8
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Fri Aug 28 19:46:31 2020 -0500
Disable submit on enter in autocomplete inputs
diff --git a/share/static/js/util.js b/share/static/js/util.js
index d5bf84562a..f327f30474 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -591,3 +591,12 @@ function toggle_hide_unset(e) {
return false;
}
+
+// disable submit on enter in autocomplete
+jQuery(function() {
+ jQuery('input[class^="autocompletes-"]').keypress(function (e) {
+ if (e.keyCode === 13) {
+ return false;
+ }
+ });
+});
-----------------------------------------------------------------------
More information about the rt-commit
mailing list