+MIM.focus_in = function (event)
+{
+ var target = event.target;
+ var ic = target.mim_ic;
+ if (ic)
+ {
+ if (target.mim_ignore_focus_in)
+ {
+ // Ignore this event which happened in setSelectionRange ().
+ target.mim_ignore_focus_in = false;
+ event.preventDefault ();
+ }
+ else
+ {
+ try {
+ ic.Filter (MIM.Key.FocusIn);
+ MIM.update (target, ic);
+ // Ignore further focus-in caused by setSelectionRange ().
+ target.mim_ignore_focus_in = true;
+ }
+ catch (e) { Xex.Log ('Error:' + e); throw (e); }
+ }
+ }
+}
+
+MIM.focus_out = function (event)