fix: stop right click emulation once window got opened eg chest

This commit is contained in:
Vitaly Turovsky 2025-08-31 18:31:49 +03:00
commit d0d5234ba4

View file

@ -110,7 +110,7 @@ const domListeners = (bot: Bot) => {
}, { signal: abortController.signal })
bot.mouse.beforeUpdateChecks = () => {
if (!document.hasFocus()) {
if (!document.hasFocus() || !isGameActive(true)) {
// deactive all buttons
bot.mouse.buttons.fill(false)
}