 
     /**
      *  @private
+     *  Gets called by internal field so we draw a focus rect around us.
+     */
+    override protected function focusInHandler(event:FocusEvent):void
+    {
+        super.focusInHandler(event);
+
+        if (_imeMode != null && 
+            (htmlLoader is IIMESupport && IIMESupport(htmlLoader).enableIME))
+        {
+            // When IME.conversionMode is unknown it cannot be
+            // set to anything other than unknown(English)
+            try
+            {
+                if (!errorCaught &&
+                    IME.conversionMode != IMEConversionMode.UNKNOWN)
+                {
+                    IME.conversionMode = _imeMode;
+                }
+                errorCaught = false;
+            }
+            catch(e:Error)
+            {
+                // Once an error is thrown, focusIn is called 
+                // again after the Alert is closed, throw error 
+                // only the first time.
+                errorCaught = true;
+                var message:String = resourceManager.getString(
+                    "controls", "unsupportedMode", [ _imeMode ]);
+                throw new Error(message);
+            }
+        }
+    }
+
+    /**
+     *  @private
      */
     override protected function scrollHandler(event:Event):void
     {

//--------------------------------------

[IconFile("HTML.png")]

/**
 *  The HTML control lets you display HTML content in your application.

     */
    private var textSet:Boolean;

    /**
     *  @private
     */    
    private var errorCaught:Boolean = false;

    //--------------------------------------------------------------------------
    //
    //  Overridden properties
