ingame/tradewindow/keyboard/tradewindow_keyboard.lua:84 -- tradeScene:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
PLAYER_INVENTORY:SetContextForInventories("tradeTextSearch", INVENTORY_TYPE_LIST)
TEXT_SEARCH_MANAGER:ActivateTextSearch("tradeTextSearch")
KEYBIND_STRIP:AddKeybindButtonGroup(self.keybindStripDescriptor)
elseif newState == SCENE_HIDING then
--The trade is often over as the scene starts hiding. If we don't remover the Submit Offer keybind here
--we can run into a case where it collides with the enchant keyind on an item since that is only gated
--from showing when we are actually in the trade (ESO-489071).
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.keybindStripDescriptor)
elseif newState == SCENE_HIDDEN then
TEXT_SEARCH_MANAGER:DeactivateTextSearch("tradeTextSearch")
local REMOVE_CONTEXT = nil
PLAYER_INVENTORY:SetContextForInventories(REMOVE_CONTEXT, INVENTORY_TYPE_LIST)
TradeCancel()
CURRENCY_INPUT:Hide()
TradeSetMoney(0)
self.myOfferedMoney = 0
end
end)