File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1076,7 +1076,7 @@ the specific language governing permissions and limitations under the Apache Lic
10761076 */
10771077 // abstract
10781078 monitorSource : function ( ) {
1079- var el = this . opts . element , observer ;
1079+ var el = this . opts . element , observer , self = this ;
10801080
10811081 el . on ( "change.select2" , this . bind ( function ( e ) {
10821082 if ( this . opts . element . data ( "select2-change-triggered" ) !== true ) {
@@ -1106,7 +1106,7 @@ the specific language governing permissions and limitations under the Apache Lic
11061106 // IE8-10 (IE9/10 won't fire propertyChange via attachEventListener)
11071107 if ( el . length && el [ 0 ] . attachEvent ) {
11081108 el . each ( function ( ) {
1109- this . attachEvent ( "onpropertychange" , this . _sync ) ;
1109+ this . attachEvent ( "onpropertychange" , self . _sync ) ;
11101110 } ) ;
11111111 }
11121112
@@ -1115,7 +1115,7 @@ the specific language governing permissions and limitations under the Apache Lic
11151115 if ( observer !== undefined ) {
11161116 if ( this . propertyObserver ) { delete this . propertyObserver ; this . propertyObserver = null ; }
11171117 this . propertyObserver = new observer ( function ( mutations ) {
1118- mutations . forEach ( this . _sync ) ;
1118+ mutations . forEach ( self . _sync ) ;
11191119 } ) ;
11201120 this . propertyObserver . observe ( el . get ( 0 ) , { attributes :true , subtree :false } ) ;
11211121 }
You can’t perform that action at this time.
0 commit comments