Browse Source

Fixes #1532 Regexp restarts search from middle of string on multiple iterations, breaking search

pull/1550/head
jlukic 10 years ago
parent
commit
1d76049535
1 changed files with 2 additions and 2 deletions
  1. 4
      src/definitions/modules/dropdown.js

4
src/definitions/modules/dropdown.js

@ -378,11 +378,11 @@ $.fn.dropdown = function(parameters) {
text = module.get.choiceText($choice, false), text = module.get.choiceText($choice, false),
value = module.get.choiceValue($choice, text) value = module.get.choiceValue($choice, text)
; ;
if( exactRegExp.test( text ) || exactRegExp.test( value ) ) {
if( text.match(exactRegExp) || value.match(exactRegExp) ) {
$results = $results.add($choice); $results = $results.add($choice);
} }
else if(settings.fullTextSearch) { else if(settings.fullTextSearch) {
if( fullTextRegExp.test( text ) || fullTextRegExp.test( value ) ) {
if( text.match(fullTextRegExp) || value.match(fullTextRegExp) ) {
$results = $results.add($choice); $results = $results.add($choice);
} }
} }

Loading…
Cancel
Save