| 
														
															@@ -1324,6 +1324,10 @@ the specific language governing permissions and limitations under the Apache Lic 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         // abstract 
														 | 
														
														 | 
														
															         // abstract 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         blur: function () { 
														 | 
														
														 | 
														
															         blur: function () { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            // if selectOnBlur == true, select the currently highlighted option 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (this.opts.selectOnBlur) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                this.selectHighlighted({noFocus: true}); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             this.close(); 
														 | 
														
														 | 
														
															             this.close(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             this.container.removeClass("select2-container-active"); 
														 | 
														
														 | 
														
															             this.container.removeClass("select2-container-active"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             this.dropdown.removeClass("select2-drop-active"); 
														 | 
														
														 | 
														
															             this.dropdown.removeClass("select2-drop-active"); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1351,14 +1355,14 @@ the specific language governing permissions and limitations under the Apache Lic 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         }, 
														 | 
														
														 | 
														
															         }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         // abstract 
														 | 
														
														 | 
														
															         // abstract 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        selectHighlighted: function () { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        selectHighlighted: function (options) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             var index=this.highlight(), 
														 | 
														
														 | 
														
															             var index=this.highlight(), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 highlighted=this.results.find(".select2-highlighted").not(".select2-disabled"), 
														 | 
														
														 | 
														
															                 highlighted=this.results.find(".select2-highlighted").not(".select2-disabled"), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 data = highlighted.closest('.select2-result-selectable').data("select2-data"); 
														 | 
														
														 | 
														
															                 data = highlighted.closest('.select2-result-selectable').data("select2-data"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (data) { 
														 | 
														
														 | 
														
															             if (data) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 highlighted.addClass("select2-disabled"); 
														 | 
														
														 | 
														
															                 highlighted.addClass("select2-disabled"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 this.highlight(index); 
														 | 
														
														 | 
														
															                 this.highlight(index); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                this.onSelect(data); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                this.onSelect(data, options); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         }, 
														 | 
														
														 | 
														
															         }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1708,13 +1712,15 @@ the specific language governing permissions and limitations under the Apache Lic 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         }, 
														 | 
														
														 | 
														
															         }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         // single 
														 | 
														
														 | 
														
															         // single 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        onSelect: function (data) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        onSelect: function (data, options) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             var old = this.opts.element.val(); 
														 | 
														
														 | 
														
															             var old = this.opts.element.val(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															             this.opts.element.val(this.id(data)); 
														 | 
														
														 | 
														
															             this.opts.element.val(this.id(data)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             this.updateSelection(data); 
														 | 
														
														 | 
														
															             this.updateSelection(data); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             this.close(); 
														 | 
														
														 | 
														
															             this.close(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            this.selection.focus(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (!options || !options.noFocus) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                this.selection.focus(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (!equal(old, this.id(data))) { this.triggerChange(); } 
														 | 
														
														 | 
														
															             if (!equal(old, this.id(data))) { this.triggerChange(); } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         }, 
														 | 
														
														 | 
														
															         }, 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -2069,7 +2075,7 @@ the specific language governing permissions and limitations under the Apache Lic 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         }, 
														 | 
														
														 | 
														
															         }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         // multi 
														 | 
														
														 | 
														
															         // multi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        onSelect: function (data) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        onSelect: function (data, options) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             this.addSelectedChoice(data); 
														 | 
														
														 | 
														
															             this.addSelectedChoice(data); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (this.select || !this.opts.closeOnSelect) this.postprocessResults(); 
														 | 
														
														 | 
														
															             if (this.select || !this.opts.closeOnSelect) this.postprocessResults(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -2091,7 +2097,8 @@ the specific language governing permissions and limitations under the Apache Lic 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             // added we do not need to check if this is a new element before firing change 
														 | 
														
														 | 
														
															             // added we do not need to check if this is a new element before firing change 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             this.triggerChange({ added: data }); 
														 | 
														
														 | 
														
															             this.triggerChange({ added: data }); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            this.focusSearch(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (!options || !options.noFocus) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                this.focusSearch(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         }, 
														 | 
														
														 | 
														
															         }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         // multi 
														 | 
														
														 | 
														
															         // multi 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -2445,7 +2452,8 @@ the specific language governing permissions and limitations under the Apache Lic 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             return markup; 
														 | 
														
														 | 
														
															             return markup; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         }, 
														 | 
														
														 | 
														
															         }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        blurOnChange: false 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        blurOnChange: false, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        selectOnBlur: false 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     }; 
														 | 
														
														 | 
														
															     }; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     // exports 
														 | 
														
														 | 
														
															     // exports 
														 |