SobranDM / foundryvtt-wwn

GNU General Public License v3.0
12 stars 18 forks source link

When Tokenizer is enabled, it is not possible to click to change Avatar #37

Open TheBiggerBadderBear opened 1 year ago

TheBiggerBadderBear commented 1 year ago

Foundry Version: 9 (Build 269) WWN Version: 1.0.0

Tokenizer currently doesn't work fully with WWN. When Tokenizer is set as Enabled there is no way to click the portrait picture of the Actor and change the Avatar. No matter which Tokenizer settings are used (e.g. only use Shift+click to open Tokenizer), clicking the character picture in WWN will only allow opening the Tokenizer window.

To reproduce: 1) Add the module 'Tokenizer' and Enable it 2) Open a Character Actor 3) Click the placeholder portrait icon 4) Note that Tokenizer opens (as expected) 5) Go to Tokenizer Settings, try ticking 'Disable avatar click' (this should mean Avatar selection opens on lmb, and Tokenizer on shift+lmb). 6) Refresh the browser page 7) Observe that clicking the portrait area does nothing, though shift+click opens Tokenizer as expected.

When trying to click the option that should allow changing the avatar there is an error in the log of:

Uncaught TypeError: Cannot read properties of undefined (reading 'data') [Detected 1 package: vtta-tokenizer] at HTMLImageElement. (hooks.js:289:37) at HTMLImageElement.dispatch (jquery.min.js:2:43064) at v.handle (jquery.min.js:2:41048)

This isn't a major issue as there are simple workarounds: 1) Get the path of the avatar image, then open Tokenizer, set Tokenizer to Paste Target 'Avatar' and paste the url of the Avatar in or 2) Disable Tokenizer, set Avatars, then reenable Tokenizer.