From 1d76049535b1ff90bd811f2ead77dd07c69282ee Mon Sep 17 00:00:00 2001 From: jlukic Date: Mon, 29 Dec 2014 17:10:50 -0500 Subject: [PATCH] Fixes #1532 Regexp restarts search from middle of string on multiple iterations, breaking search --- src/definitions/modules/dropdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 0ceb765a7..43ec09ebf 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -378,11 +378,11 @@ $.fn.dropdown = function(parameters) { text = module.get.choiceText($choice, false), value = module.get.choiceValue($choice, text) ; - if( exactRegExp.test( text ) || exactRegExp.test( value ) ) { + if( text.match(exactRegExp) || value.match(exactRegExp) ) { $results = $results.add($choice); } else if(settings.fullTextSearch) { - if( fullTextRegExp.test( text ) || fullTextRegExp.test( value ) ) { + if( text.match(fullTextRegExp) || value.match(fullTextRegExp) ) { $results = $results.add($choice); } }