Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

OnKeyUp frame script handlers not called for frames having propagateKeyboardInput="true" #487

Open LenweSaralonde opened 9 months ago

LenweSaralonde commented 9 months ago

OnKeyUp frame script handlers not called for frames having keyboard input propagation enabled.

Reproduction scenario

Create a frame with keyboard input propagation enabled and OnKeyDown and OnKeyUp handlers:

/run MyTestFrame = CreateFrame("Frame", nil, UIParent)
/run MyTestFrame:EnableKeyboard(); MyTestFrame:SetPropagateKeyboardInput(true)
/run MyTestFrame:SetScript("OnKeyDown", function(_, key) print("Key DOWN", key) end)
/run MyTestFrame:SetScript("OnKeyUp", function(_, key) print("Key UP", key) end)

Expected result

Key DOWN and Key UP events are shown and properly propagated to the rest of the UI.

Actual result

Only the Key DOWN events are shown, Key UP events are missing.

Additional notes

It works as expected if we disable keyboard input propagation:

/run MyTestFrame:SetPropagateKeyboardInput(false)