diff --git a/modules/PlayerHealth.lua b/modules/PlayerHealth.lua index ac1a975..e58f81c 100644 --- a/modules/PlayerHealth.lua +++ b/modules/PlayerHealth.lua @@ -854,9 +854,11 @@ function PlayerHealth.prototype:CreateBackground(redraw) end end - self.frame.button.menu = function() - IceHUD.DropdownUnit = self.unit - ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor") + if not self.frame.button.menu then + self.frame.button.menu = function(this, unit) + IceHUD.DropdownUnit = unit + ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor") + end end self:EnableClickTargeting(self.moduleSettings.allowMouseInteraction) diff --git a/modules/TargetHealth.lua b/modules/TargetHealth.lua index c00a0db..01357d8 100644 --- a/modules/TargetHealth.lua +++ b/modules/TargetHealth.lua @@ -699,9 +699,11 @@ function IceTargetHealth.prototype:CreateBackground(redraw) end end - self.frame.button.menu = function() - IceHUD.DropdownUnit = self.unit - ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor") + if not self.frame.button.menu then + self.frame.button.menu = function(this, unit) + IceHUD.DropdownUnit = unit + ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor") + end end end end diff --git a/modules/TargetInfo.lua b/modules/TargetInfo.lua index 20de401..1bcde3d 100644 --- a/modules/TargetInfo.lua +++ b/modules/TargetInfo.lua @@ -1037,8 +1037,8 @@ do -- OVERRIDE: IceTargetInfo.prototype:CreateFrame(redraw) self.frame:SetAttribute("unit", self.unit) if not self.frame.menu then - self.frame.menu = function() - IceHUD.DropdownUnit = self.unit + self.frame.menu = function(this, unit) + IceHUD.DropdownUnit = unit ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor") end end