Moerill / Moerill/fvtt-pointer

[BUG] check if canvas is disabled before initializing the module

Open
#36 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
5
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Since FVTT 0.8.6 you can disable the canvas within the settings on the client side.
This produces some errors in the console since keybindings.js#L114 and L150 use canvas.app and canvas.controls properties which are undefined when the canvas is disabled.

Adding a check for game.settings.get("core", "noCanvas") which should be false before initialization of your code should prevent these errors.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open keybindings.js and inspect the references at lines 114 and 150, where canvas.app and canvas.controls are used during initialization. Check the core noCanvas setting behavior and verify that the module initializes without console errors when the canvas is disabled, while retaining its existing behavior when enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.