@@ -698,7 +698,7 @@ the specific language governing permissions and limitations under the Apache Lic
698698 label = $ ( document . createElement ( "div" ) ) ;
699699 label . addClass ( "select2-result-label" ) ;
700700
701- formatted = opts . escapeMarkup ( opts . formatResult ( result , label , query ) ) ;
701+ formatted = opts . formatResult ( result , label , query , self . opts . escapeMarkup ) ;
702702 if ( formatted !== undefined ) {
703703 label . html ( formatted ) ;
704704 }
@@ -1521,6 +1521,7 @@ the specific language governing permissions and limitations under the Apache Lic
15211521 focus : function ( ) {
15221522 this . close ( ) ;
15231523 this . selection . focus ( ) ;
1524+ this . opts . element . triggerHandler ( "focus" ) ;
15241525 } ,
15251526
15261527 // single
@@ -2132,6 +2133,7 @@ the specific language governing permissions and limitations under the Apache Lic
21322133 focus : function ( ) {
21332134 this . close ( ) ;
21342135 this . search . focus ( ) ;
2136+ this . opts . element . triggerHandler ( "focus" ) ;
21352137 } ,
21362138
21372139 // multi
@@ -2527,9 +2529,9 @@ the specific language governing permissions and limitations under the Apache Lic
25272529 dropdownCss : { } ,
25282530 containerCssClass : "" ,
25292531 dropdownCssClass : "" ,
2530- formatResult : function ( result , container , query ) {
2532+ formatResult : function ( result , container , query , escapeMarkup ) {
25312533 var markup = [ ] ;
2532- markMatch ( result . text , query . term , markup , this . escapeMarkup ) ;
2534+ markMatch ( result . text , query . term , markup , escapeMarkup ) ;
25332535 return markup . join ( "" ) ;
25342536 } ,
25352537 formatSelection : function ( data , container ) {
0 commit comments