Skip to content

Commit d22fb32

Browse files
committed
Fix Shift+Click on search result when inserting into chat searching again
1 parent 0f7d697 commit d22fb32

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Source/Shopping/Hooks.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,8 @@ end
4242
-- selection dialog (to replicate, when ChatEdit_InsertLink is manually
4343
-- replaced, hold down "c" while pressing [Enter] with the stack dialog open)
4444
hooksecurefunc(_G, "ChatEdit_InsertLink", function(text)
45-
SearchItem(text)
45+
-- Prevent searching when the user is attempting to link the item in chat
46+
if GetCurrentKeyBoardFocus() == nil or GetCurrentKeyBoardFocus():GetName() == nil then
47+
SearchItem(text)
48+
end
4649
end)

0 commit comments

Comments
 (0)