diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js index 1cba5eb4..974f3539 100644 --- a/lib/jquery.ime/jquery.ime.js +++ b/lib/jquery.ime/jquery.ime.js @@ -1,4 +1,4 @@ -/*! jquery.ime - v0.1.0 - 2013-03-11 +/*! jquery.ime - v0.1.0 - 2013-03-13 * https://github.com/wikimedia/jquery.ime * Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */ ( function ( $ ) { @@ -22,6 +22,9 @@ listen: function () { this.$element.on( 'keypress.ime', $.proxy( this.keypress, 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 ) ); }, /** @@ -165,6 +168,11 @@ this.active = !this.active; }, + destroy: function () { + $( 'body' ).off( '.ime' ); + this.$element.off( '.ime' ).removeData( 'ime' ).removeData( 'imeselector' ); + }, + getIM: function () { return this.inputmethod; },