mclemente / fvtt-token-health

MIT License
0 stars 0 forks source link

When using Enter as keybind, changing HP via default Token HUD is not possible #2

Open nschoenwald opened 2 months ago

nschoenwald commented 2 months ago

When right-clicking token and changing HP there, pressing Enter then opens the Token Health pop-up and does not apply the changed HP in the Token HUD. The Token Health pop-up should not open when the Token HUD is open.

mclemente commented 2 months ago

I couldn't reproduce the behavior of not having it apply the changes. For me, it is applying the change and then opening the dialog.

Anyway, I can see how that can be annoying and having it not be opened when the Token HUD is rendered is a good compromise.

nschoenwald commented 2 months ago

Thank you so much for fixing my issues so quickly!

nschoenwald commented 2 months ago

@mclemente Unfortunately this has not been fixed for me in 1.0.3. It still happens.

mclemente commented 2 months ago

What system are you using? Can you test with only this module enabled? The token bar changes should take effect before the dialog opens.

nschoenwald commented 2 months ago

It happens with me using dnd5e with only this module enabled. Current versions of everything (V12, dnd5e 3.3). I open the Token HUD with right click, enter a number, e.g. "-3" and press enter. It does apply the 3 damage, but then the Token Health pops up immediately.

nschoenwald commented 1 month ago

This also makes changing the token's height very annoying. I had to disable the module for now because of this interference. Would love to see a fix.

mclemente commented 1 month ago

There's nothing that I can do about it, by the time the changes are applied, Foundry triggers the keybinding and there is no way to tell if the token was just updated by pressing Enter. I'll probably revert the original fix since it didn't help at all and made the dialog only pop up when the HUD is isn't rendered.

You could just change the keybinding, though.

nschoenwald commented 1 month ago

I changed the keybinding to the H key and it works fine now. Maybe it would make sense to change the default keybinding in the module because the Enter key causes these issues?