Open LenweSaralonde opened 9 months ago
OnKeyUp frame script handlers not called for frames having keyboard input propagation enabled.
Create a frame with keyboard input propagation enabled and OnKeyDown and OnKeyUp handlers:
OnKeyDown
OnKeyUp
/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)
Key DOWN and Key UP events are shown and properly propagated to the rest of the UI.
Key DOWN
Key UP
Only the Key DOWN events are shown, Key UP events are missing.
It works as expected if we disable keyboard input propagation:
/run MyTestFrame:SetPropagateKeyboardInput(false)
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
andOnKeyUp
handlers:Expected result
Key DOWN
andKey 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: