diff options
author | Felix Nagel <info@felixnagel.com> | 2016-08-18 00:15:29 +0200 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2016-08-24 11:56:26 -0400 |
commit | ac9ca9e52c90da56b6846501800103605467f98b (patch) | |
tree | 655c277fdc5faa166742a659f2def38d249bc8b0 /ui | |
parent | 1148aefd597ef465800622d57eae4a71b6fce85b (diff) | |
download | jquery-ui-ac9ca9e52c90da56b6846501800103605467f98b.tar.gz jquery-ui-ac9ca9e52c90da56b6846501800103605467f98b.zip |
Menu: Support number pad keyboard input
Fixes #15031
Closes gh-1732
Diffstat (limited to 'ui')
-rw-r--r-- | ui/widgets/menu.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/widgets/menu.js b/ui/widgets/menu.js index 73800506f..49da26865 100644 --- a/ui/widgets/menu.js +++ b/ui/widgets/menu.js @@ -236,9 +236,12 @@ return $.widget( "ui.menu", { default: preventDefault = false; prev = this.previousFilter || ""; - character = String.fromCharCode( event.keyCode ); skip = false; + // Support number pad values + character = event.keyCode >= 96 && event.keyCode <= 105 ? + ( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode ); + clearTimeout( this.filterTimer ); if ( character === prev ) { |