Fix the chat input bug.
It's a mystery wrapped in a heisenbug inside sunspots. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@774 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -9,7 +9,6 @@ import flash.events.Event;
|
|||||||
import flash.events.FocusEvent;
|
import flash.events.FocusEvent;
|
||||||
import flash.events.KeyboardEvent;
|
import flash.events.KeyboardEvent;
|
||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
import flash.events.TextEvent;
|
|
||||||
|
|
||||||
import flash.ui.Keyboard;
|
import flash.ui.Keyboard;
|
||||||
|
|
||||||
@@ -22,6 +21,7 @@ import mx.controls.TextInput;
|
|||||||
import mx.events.FlexEvent;
|
import mx.events.FlexEvent;
|
||||||
|
|
||||||
import com.threerings.util.ArrayUtil;
|
import com.threerings.util.ArrayUtil;
|
||||||
|
import com.threerings.util.MethodQueue;
|
||||||
import com.threerings.util.StringUtil;
|
import com.threerings.util.StringUtil;
|
||||||
|
|
||||||
import com.threerings.flex.CommandButton;
|
import com.threerings.flex.CommandButton;
|
||||||
@@ -139,8 +139,16 @@ public class ChatControl extends HBox
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there was no error, clear the entry area in prep for the next entry event
|
// If there was no error, clear the entry area in prep for the next entry event
|
||||||
_txt.text = "";
|
MethodQueue.callLater(function () : void {
|
||||||
|
// WORKAROUND
|
||||||
|
// Originally we cleared the text immediately, but with flex 3.2 this broke
|
||||||
|
// for *some* people. Weird! We're called from the event dispatcher for the
|
||||||
|
// enter key, so it's possible that the default action is booching it?
|
||||||
|
// In any case, this could possibly be removed in the future by the ambitious.
|
||||||
|
// Note also: Flex's built-in callLater() doesn't work, but MethodQueue does. WTF?!?
|
||||||
|
_txt.text = "";
|
||||||
|
});
|
||||||
_histidx = -1;
|
_histidx = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user