Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map key listeners are not consistently active #305

Closed
DanVanAtta opened this issue Dec 29, 2015 · 8 comments
Closed

map key listeners are not consistently active #305

DanVanAtta opened this issue Dec 29, 2015 · 8 comments
Labels
ice box - close and revisit later Problem A problem, bug, defect - something to fix

Comments

@DanVanAtta
Copy link
Member

It appears in multiplayer games the key listener for the 'n' key (select next unit) is not kept around properly. In single player games I have not seen this problem. In multiplayer sometimes you have to click the map or interact with it for the key listener to be "recreated". At that point the "n" key is then active.

Debugging the code, when this problem occurs the event handler code for the "n" key press event is not executed at all (hence the hypothesis that the key listener is being destroyed and recreated)

@DanVanAtta DanVanAtta added the Problem A problem, bug, defect - something to fix label Dec 30, 2015
@DanVanAtta
Copy link
Member Author

I'd like to state explicitly,the impact of this bug: this is why most lobby players still believe that the 'n' and 'f' keys do not work. Initial launch of those features never worked very well, and now after being 'fixed', still does not work consistently. I personally gave up on using those two feature keys, and I'm quite sure many others have as well.

@DanVanAtta
Copy link
Member Author

Bumping this up since I run into this all the time. "F" is now very useful now that the highlight is strong. I keep clicking the map as a work-around to allow the "F" to key to then work. Same thing for undoing with "u" key.
@RoiEXLab , @frigoref , this is an excellent one to pick up if you have the capacity.

@DanVanAtta
Copy link
Member Author

This is an important fix, the "f" and "n" key seem broken unless a person knows to click on the map first, which is very non-intuitive.

@RoiEXLab
Copy link
Member

RoiEXLab commented Jun 7, 2016

I think I can pick up this one...

@RoiEXLab RoiEXLab mentioned this issue Jun 20, 2016
@RoiEXLab
Copy link
Member

@DanVanAtta I might have an Idea what could be causing this...
I found this Question on Stackoverflow, leading to the possibility that this issue is due to the delay of multiplayer games...
Any ideas where this could be happening?

@DanVanAtta
Copy link
Member Author

I've seen in some places we "clean up" listeners. I've suspected this is due to us removing the listener in multiplayer games, and then not adding it back until a click event has happened on the map.

@RoiEXLab
Copy link
Member

@DanVanAtta

I've seen in some places we "clean up" listeners.

That's what I couldn't find... but maybe I searched for the wrong thing... If you can still find a place, please tell me...

@DanVanAtta DanVanAtta changed the title key listener for 'n' key is not consistently active in multiplayer games map key listeners are not consistently active Oct 14, 2017
@DanVanAtta
Copy link
Member Author

New simpler repro:

  • move a unit
  • hover over unit and press 'u'

Expect:

  • move to be undone

Actual:

  • nothing happens

Note, if you click the map anywhere, then repeat the hover and 'u' action, then the mvoe will be undone as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ice box - close and revisit later Problem A problem, bug, defect - something to fix
Projects
None yet
Development

No branches or pull requests

3 participants