Update jquery.ime from upstream

* Replace jQuery.proxy() with Function.prototype.bind()

Updating to e11d7951e3

Change-Id: Ic1a39d0e994dd1a3cb5eaae723b3b68de7e68132
This commit is contained in:
petarpetkovic
2018-05-29 16:21:45 +02:00
committed by jenkins-bot
parent fa5e448b17
commit c0e3967271

View File

@@ -1,4 +1,4 @@
/*! jquery.ime - v0.2.0+20180528
/*! jquery.ime - v0.2.0+20180529
* https://github.com/wikimedia/jquery.ime
* Copyright (c) 2018 Santhosh Thottingal; License: (GPL-2.0+ OR MIT) */
( function ( $ ) {
@@ -76,12 +76,14 @@
* Listen for events and bind to handlers
*/
listen: function () {
this.$element.on( 'keypress.ime', $.proxy( this.keypress, this ) );
this.$element.on( 'keyup.ime', $.proxy( this.keyup, this ) );
this.$element.on( 'keydown.ime', $.proxy( this.keydown, this ) );
this.$element.on( 'destroy.ime', $.proxy( this.destroy, this ) );
this.$element.on( 'enable.ime', $.proxy( this.enable, this ) );
this.$element.on( 'disable.ime', $.proxy( this.disable, this ) );
this.$element.on( {
'keypress.ime': this.keypress.bind( this ),
'keyup.ime': this.keyup.bind( this ),
'keydown.ime': this.keydown.bind( this ),
'destroy.ime': this.destroy.bind( this ),
'enable.ime': this.enable.bind( this ),
'disable.ime': this.disable.bind( this )
} );
},
/**
@@ -1077,8 +1079,10 @@
} );
// Possible resize of textarea
imeselector.$element.on( 'mouseup.ime', $.proxy( this.position, this ) );
imeselector.$element.on( 'keydown.ime', $.proxy( this.keydown, this ) );
imeselector.$element.on( {
'mouseup.ime': this.position.bind( this ),
'keydown.ime': this.keydown.bind( this )
} );
// Update IM selector position when the window is resized
// or the browser window is zoomed in or zoomed out