google-code-export / pushbuttonengine

Automatically exported from code.google.com/p/pushbuttonengine
0 stars 0 forks source link

InputMap does not always receive keyboard input. #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Pop up a dialog that requires mouse/keyboard input.
2. Close it.
3. Input does not any longer go to the InputMap.

What is the expected output? What do you see instead?

Should always have input going to InputMap.

Original issue reported on code.google.com by ben.garney on 4 Apr 2009 at 1:14

GoogleCodeExporter commented 9 years ago
You likely already know the cause / fix of this, but here's a snippet and a code
comment from one of my recent games that ran into this issue:

    // See this thread for a reasonable description of the problem I'm running up
against:
    //  http://board.flashkit.com/board/showthread.php?threadid=761063
    // Long story short, when removing child objects, it can screw up the keyboard
event handler and keep it from receiving events (even though the events are 
attached
to the stage, and should be unaffected), requiring another click on the app to 
re-set
focus. This hack takes care of that.
    private function correctFocusHack():void {
      stage.focus=stage;
    }

Original comment by HanCli...@gmail.com on 4 Apr 2009 at 1:22

GoogleCodeExporter commented 9 years ago
I'm stealing this as part of the InputManager re-write

Original comment by zaal...@gmail.com on 10 Nov 2009 at 5:18