@@ -22,6 +22,7 @@ export class CompositionHelper {
2222 * IME. This variable determines whether the compositionText should be displayed on the UI.
2323 */
2424 private _isComposing : boolean ;
25+ public get isComposing ( ) : boolean { return this . _isComposing ; }
2526
2627 /**
2728 * The position within the input textarea's value of the current composition.
@@ -118,7 +119,6 @@ export class CompositionHelper {
118119 private _finalizeComposition ( waitForPropagation : boolean ) : void {
119120 this . _compositionView . classList . remove ( 'active' ) ;
120121 this . _isComposing = false ;
121- this . _clearTextareaPosition ( ) ;
122122
123123 if ( ! waitForPropagation ) {
124124 // Cancel any delayed composition send requests and send the input immediately.
@@ -207,6 +207,7 @@ export class CompositionHelper {
207207 // Sync the textarea to the exact position of the composition view so the IME knows where the
208208 // text is.
209209 const compositionViewBounds = this . _compositionView . getBoundingClientRect ( ) ;
210+ this . _textarea . style . position = 'absolute' ;
210211 this . _textarea . style . left = cursorLeft + 'px' ;
211212 this . _textarea . style . top = cursorTop + 'px' ;
212213 this . _textarea . style . width = compositionViewBounds . width + 'px' ;
@@ -218,13 +219,4 @@ export class CompositionHelper {
218219 setTimeout ( ( ) => this . updateCompositionElements ( true ) , 0 ) ;
219220 }
220221 }
221-
222- /**
223- * Clears the textarea's position so that the cursor does not blink on IE.
224- * @private
225- */
226- private _clearTextareaPosition ( ) : void {
227- this . _textarea . style . left = '' ;
228- this . _textarea . style . top = '' ;
229- }
230222}
0 commit comments