Ticket #6390: 6390.patch
| File 6390.patch, 1.0 kB (added by haysmark, 9 months ago) |
|---|
-
form/ComboBox.js
1 1 dojo.provide("dijit.form.ComboBox"); 2 2 3 3 dojo.require("dijit.form.ValidationTextBox"); 4 dojo.require("dojo.data.util.filter"); 4 5 dojo.requireLocalization("dijit.form", "ComboBox"); 5 6 6 7 dojo.declare( … … 1030 1031 // will call `onComplete()` with the results of the query (and the argument to this method) 1031 1032 1032 1033 // convert query to regex (ex: convert "first\last*" to /^first\\last.*$/i) and get matching vals 1033 var query = "^" + args.query.name 1034 .replace(/([\\\|\(\)\[\{\^\$\+\?\.\<\>])/g, "\\$1") 1035 .replace("*", ".*") + "$", 1036 matcher = new RegExp(query, args.queryOptions.ignoreCase ? "i" : ""), 1034 var matcher = dojo.data.util.filter.patternToRegExp(args.query.name, args.queryOptions.ignoreCase), // #6390 1037 1035 items = dojo.query("> option", this.root).filter(function(option){ 1038 1036 return (option.innerText || option.textContent || '').match(matcher); 1039 1037 } );