Skip to content

Conversation

ninjamuffin99
Copy link
Member

On HTML5, FlxG.stage.addEventListener seems to not properly do the keyboard events for the CompletionList.

This PR changes it so that onKeyDown is passed through from the debug consoles input event listeners, so using the arrow keys to move through the completions now works on HTML5 properly

createScrollBar();
updateSelectedItem();

FlxG.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why this wasn't working? Is this a preventDefault issue? or is the console blocking these events somehow?

Copy link
Member Author

@ninjamuffin99 ninjamuffin99 Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure, I believe it's not console or FlxG.stage specific, since Lib.current.addEventListener also doesn't register tab key, and also the autofocus event listener doesn't work either ("Press TAB to focus the console!") in HTML5. It could be a preventDefault thing!

@Geokureli Geokureli merged commit 9954eb5 into HaxeFlixel:dev Aug 14, 2024
@Geokureli
Copy link
Member

Thanks, if we figure out what's blocking events we can revisit this

@Geokureli Geokureli added this to the 5.9.0 milestone Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants