Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Automatic game focus on handling update can seem delayed #8

Closed
Opinion opened this issue Nov 7, 2022 · 0 comments · Fixed by #11
Closed

Automatic game focus on handling update can seem delayed #8

Opinion opened this issue Nov 7, 2022 · 0 comments · Fixed by #11
Assignees
Labels
bug Something isn't working

Comments

@Opinion
Copy link
Owner

Opinion commented Nov 7, 2022

  • Game version: 1.0.1
  • Userscript version: 1.2

Description

When an input changes in the handling editor, the handling will be updated and the focus will be put back on the game's canvas.

If you update a value and click another input, it can sometimes ignore the new input you focused on and instead give focus to the game's canvas.

Desired outcome:

Give focus to the game if another input is not already in focus.

@Opinion Opinion added this to the Userscript v1.3 milestone Nov 7, 2022
@Opinion Opinion self-assigned this Nov 7, 2022
@Opinion Opinion added the bug Something isn't working label Nov 7, 2022
@Opinion Opinion linked a pull request Nov 7, 2022 that will close this issue
Opinion added a commit that referenced this issue Nov 8, 2022
See issue #8

Changes:
 - Move 'putFocusOnGameCanvas()' from 'DocumentInteraction' to
   'HandlingEditor'.
 -  When input 'change' event is triggered, set the input element to
   `HandlingEditor.recentlyUpdatedInputElement`.
 - Change 'putFocusOnGameCanvas()' behavior to:
   - If the active element is an input, it will only give focus to the
     game if it's the same input as
     `HandlingEditor.recentlyUpdatedInputElement`.
   - If the active element is anything else, give focus to the game.

Closes #8
@Opinion Opinion closed this as completed Nov 8, 2022
@Opinion Opinion linked a pull request Nov 10, 2022 that will close this issue
@Opinion Opinion removed a link to a pull request Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant