From 451552ea7f81bea6c5000a19a71850e514bc8b6d Mon Sep 17 00:00:00 2001 From: r888888888 Date: Fri, 21 Jun 2013 11:36:23 -0700 Subject: [PATCH] * fixes #1784 * space will now select an item in the autocomplete --- vendor/assets/javascripts/build_patches.sh | 3 +++ .../javascripts/jquery-ui-autocomplete-custom.js | 1 + .../assets/javascripts/jquery-ui-autocomplete.patch | 12 ++++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 vendor/assets/javascripts/build_patches.sh diff --git a/vendor/assets/javascripts/build_patches.sh b/vendor/assets/javascripts/build_patches.sh new file mode 100755 index 000000000..931e2a69a --- /dev/null +++ b/vendor/assets/javascripts/build_patches.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +diff -u jquery-ui-autocomplete-1.10.2.js jquery-ui-autocomplete-custom.js > jquery-ui-autocomplete.patch diff --git a/vendor/assets/javascripts/jquery-ui-autocomplete-custom.js b/vendor/assets/javascripts/jquery-ui-autocomplete-custom.js index 7f29fbdf9..9f0399bec 100644 --- a/vendor/assets/javascripts/jquery-ui-autocomplete-custom.js +++ b/vendor/assets/javascripts/jquery-ui-autocomplete-custom.js @@ -106,6 +106,7 @@ $.widget( "ui.autocomplete", { suppressKeyPress = true; this._keyEvent( "next", event ); break; + case keyCode.SPACE: case keyCode.ENTER: case keyCode.NUMPAD_ENTER: // when menu is open and has focus diff --git a/vendor/assets/javascripts/jquery-ui-autocomplete.patch b/vendor/assets/javascripts/jquery-ui-autocomplete.patch index 7c36ef69a..7459c4899 100644 --- a/vendor/assets/javascripts/jquery-ui-autocomplete.patch +++ b/vendor/assets/javascripts/jquery-ui-autocomplete.patch @@ -1,6 +1,14 @@ --- jquery-ui-autocomplete-1.10.2.js 2013-06-21 11:19:32.000000000 -0700 -+++ jquery-ui-autocomplete-custom.js 2013-06-21 11:20:52.000000000 -0700 -@@ -121,6 +121,7 @@ ++++ jquery-ui-autocomplete-custom.js 2013-06-21 11:34:35.000000000 -0700 +@@ -106,6 +106,7 @@ + suppressKeyPress = true; + this._keyEvent( "next", event ); + break; ++ case keyCode.SPACE: + case keyCode.ENTER: + case keyCode.NUMPAD_ENTER: + // when menu is open and has focus +@@ -121,6 +122,7 @@ if ( this.menu.active ) { this.menu.select( event ); }