- try {
- if (! MIM.get_range (target, ic))
- ic.reset ();
- ic.Filter (MIM.Key.FocusOut);
- // Ignore further focus-out caused by setSelectionRange ().
- target.mim_ignore_focus_in = true;
- target.mim_ignore_focus_out = true;
- MIM.update (target, ic);
- }
- catch (e) { Xex.Log ('Error:' + e); throw (e); }
+ if (! MIM.get_range (target, ic))
+ ic.reset ();
+ ic.Filter (MIM.Key.FocusOut);
+ // Ignore further focus-out caused by setSelectionRange ().
+ target.mim_ignore_focus_in = true;
+ target.mim_ignore_focus_out = true;
+ MIM.focus_ignore_target = target;
+ MIM.update (target, ic);
+ setTimeout (MIM.cancel_ignore_focus, 100);