fluid-lab / gamepad-navigator

GSoC 2020 project
Other
7 stars 10 forks source link

History navigation gets "stuck" #98

Open duhrer opened 11 months ago

duhrer commented 11 months ago

I'm not sure how long this has been the case, but history navigation does not currently work. Attempting to go backward one step in your history goes all the way to the beginning of your history. Attempting to go forward one step in history goes all the way to the end of history.

If you try to manually undo what the plugin did, it keeps doing it. This happens even if you open a new window, which is a bit alarming.

duhrer commented 11 months ago

@jobara, I managed to get out of the "stuck" state and can no longer reproduce this.

I set breakpoints in the extension functions to move forward/backward, and before I could even hit anything, a function was triggered. I then noticed that my gamepad wasn't even connected. I reconnected my gamepad, and suddenly history navigation worked as expected. I haven't been able to get back into a broken state again.

Let's keep this ticket for a bit for notes.

duhrer commented 10 months ago

In the upcoming pull to add the onscreen keyboard, I found that I had to refactor the lifecycle to avoid destroying/(re)creating the component on focus changes. I strongly suspect this will address these issues as well, as there are a lot less chances to lose state.

duhrer commented 9 months ago

I also completely refactored the default bindings and the logic for repeating controls. I hope this will no longer be an issue.