[Bug Report] Using Ping with a keybind that includes CTRL gives a lua error
Un0 opened this issue ยท 3 comments
What game version did the bug occur in?
Retail
Troubleshooting
- I have verified that BlizzMove is up to date.
- I have tried to reproduce the bug with no other addons loaded.
- I have verified that the issue hasn't yet been reported.
Describe the bug.
When using a keybind for "Ping" in game that includes the "Ctrl" button; the latest version of BlizzMove now gives consistent errors. When I made an additional keybind to another combination that did not include "Ctrl" this error is not present.
This seems to have been caused by the recent v3.6.0 where a new method to calculate "CheckMouseWheelCapture" was introduced. Seemingly there is an assumption there that when a frame exists it should have frameData available for "IgnoreMouse" and/or "IngoreMouseWheel" which are not present on the "PingListenerFrame", see attached error for such an example. (I tried to swap the conditions in the "or" on line 898 but neither works - hence I believe the frame in question simply does not have some the expected "intractability" wrt. being able to move the frame)
When rolling back to the previous version v3.5.43 this error does not appear.
Steps to reproduce.
Bind "Ping" in game to a combination that includes "Ctrl", such as "Ctrl-X" and use ping - a lua error will immediately appear.
Expected behavior.
Being able to use keybinds that include "ctrl" should not cause a lua error if the associated frame is not movable by BlizzMove (unsure if there could be other "context-specific" frames that open at the cursor which may have the same issue).
Errors
428x BlizzMove/BlizzMove.lua:898: calling 'IsMouseWheelEnabled' on bad self (Usage: local enabled = self:IsMouseWheelEnabled())
[string "=[C]"]: in function `IsMouseWheelEnabled'
[string "@BlizzMove/BlizzMove.lua"]:898: in function `CheckMouseWheelCapture'
[string "@BlizzMove/BlizzMove.lua"]:861: in function <BlizzMove/BlizzMove.lua:861>
Locals:
(*temporary) = PingListenerFrame {
cooldownInfo = <table> {
}
enabledState = true
checkX = 587.733337
checkY = 438.399994
startX = 918.333360
PingRadialKeyDownDuration = 0.150000
startY = 685.000006
}
Thanks for the quick response!
That seems to do the trick. I no longer get lua errors when the IsForbidden check is included.
try replace line 898 with
if not shouldHandleMouseWheel and (frame:IsForbidden() or frame:IsMouseWheelEnabled() or frame:IsMouseClickEnabled()) then return; end
forgot to check for forbidden frames (the shop and friendly nameplates inside instances would have the same error presumably)
I'll try get a fix out tomorrow, but would be good if you could confirm whether this works