View Single Post
11/07/16, 03:52 PM   #10
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Disclaimer: I haven't tried running ESO since TG PTS, and am pulling stuff off a very unreliable medium.

Originally Posted by ZOS_ChipHilseberg View Post
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:
  1. /script ZO_ScrollList_Commit(ZO_PlayerInventoryBackpack)
while hovering over a container/consumable and then use it.

Originally Posted by sirinsidiator View Post
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:
  1. PLAYER_INVENTORY:UpdateList(INVENTORY_BACKPACK)
  2. HideMouse()
  3. ShowMouse()
I'd HideMouse before, UpdateList, ShowMouse after. That'll avoid superfluous OnMouseExit+Enter in UpdateList.


Originally Posted by Randactyl View Post
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.
  Reply With Quote