$( 'div.imeselector' ).hide(); $( 'div.imeselector-menu' ).removeClass( 'ime-open' );
On long pages with large DOM trees this in an inefficient operation to perform on every keystroke. It would be better to keep a list of active IMEs in memory somewhere and use that to close them.