Simple Addon Manager (SAM)

Simple Addon Manager (SAM)

128k Downloads

Dialog Boxes force focus

MSav93 opened this issue ยท 2 comments

commented

Dialog boxes such as the one pictured below, even though there is no edit box, appear to consume key inputs and stop me from moving my character or typing anything.

image

Messing with the code a little the following dialog setting appears to be the culprit dialog.enterClicksFirstButton. If this is set to true then key presses are consumed, if it's set to false then I can still move my character while dialog box is on screen.

The reason I came across this was because I started using this WA https://wago.io/Mfp9UONoB which automatically swaps profiles when in certain locations and requests a reload using SAM's internal function ShowLoadProfileAndReloadUIDialog. I often find myself entering a zone and not wanting to reload straight away but first move my character to a safe spot, or I'm just entering a zone for a second and then leaving again. But I've noticed multiple times I try to move and can't because of key presses being consumed by the open dialog.

The solution to this might just be "deal with it" or "close the dialog before you move" and I'm ok with that but just thought it was odd and worth mentioning since I haven't seen this behaviour from many other addons before.

Note:
I haven't tested it much but I believe dialog boxes with editboxes such as the rename box force focus as well.
I.e., you cannot type in chat, move character, cast spells, etc. All keypresses are consumed by the editbox even if you try to click away from it.

commented

That's working as intended, it needs to consume the keyboard to listen for the ENTER key to confirm the dialog. (enterClicksFirstButton)
I can add a parameter in that function to disable this.

commented

Completely up to you.

I only posted because I hadn't seen this behaviour doesn't seem like standard practice for WoW addons. I haven't noticed it before (not that I really looked for it) and thought it might've been unintended. I'm happy either way. ๐Ÿ‘