Disclaimer: I haven't tried running ESO since TG PTS, and am pulling stuff off a very unreliable medium.
Originally Posted by ZOS_ChipHilseberg
I'm not immediately clear on how refreshing the list triggers a UseItem. What is that code path?
|
AFAIR the culprit was that an inventory refresh triggers OnMouseExit+Enter on the item slot under mouse cursor.
Here:
https://github.com/esoui/esoui/blob/...ates.lua#L1209
Keybinds are registered in OnMouseEnter, so if the refresh is invoked from an addon, they become "insecure". I think it should be possible to trigger this even without addons. Try
Lua Code:
/script ZO_ScrollList_Commit(ZO_PlayerInventoryBackpack)
while hovering over a container/consumable and then use it.
Originally Posted by sirinsidiator
I have to admit I never read the comments for that addon. The code was terrible enough.
Jokes aside, it looks like Randactyl has found an even better solution:
Lua Code:
PLAYER_INVENTORY:UpdateList(INVENTORY_BACKPACK) HideMouse() ShowMouse()
|
I'd HideMouse before, UpdateList, ShowMouse after. That'll avoid superfluous OnMouseExit+Enter in UpdateList.
Originally Posted by Randactyl
Between steps 5 and 6 is when an addon call to PLAYER_INVENTORY:UpdateList is triggered with the cursor over an item slot (thereby causing that control to become untrusted somehow)
|
It's not relevant, but I wonder why UpdateList is called from addon context when a container is opened/closed.