From af565875e86bbd3e8b8d9e46035005a42b73dfb2 Mon Sep 17 00:00:00 2001 From: jlukic Date: Thu, 30 Apr 2015 13:06:46 -0400 Subject: [PATCH] Fix page down/up scrolling page when not search selection, simplify letter select shortcuts (first value with letter only) --- src/definitions/modules/dropdown.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 19b308a6a..8b2de047f 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -853,7 +853,7 @@ $.fn.dropdown = function(parameters) { caretAtStart = (isFocusedOnSearch && module.get.caretPosition() === 0), $nextLabel ; - if(!hasActiveLabel && !isFocusedOnSearch) { + if(isSearch && !hasActiveLabel && !isFocusedOnSearch) { return; } @@ -1080,9 +1080,11 @@ $.fn.dropdown = function(parameters) { // page down (show next page) if(pressedKey == keys.pageUp) { module.scrollPage('up'); + event.preventDefault(); } if(pressedKey == keys.pageDown) { module.scrollPage('down'); + event.preventDefault(); } // escape (close menu) @@ -1659,10 +1661,8 @@ $.fn.dropdown = function(parameters) { matchedLetter = letter.toLowerCase() ; if(firstLetter == matchedLetter) { - if(!$choice.hasClass(className.selected)) { - $nextValue = $choice; - return false; - } + $nextValue = $choice; + return false; } }) ;