Open in the app to sign in, vote and reply

Bugs · Investigating

setTopbarEnabled hover bug

· · 5 votes · 0 comments · marked investigating by on 2026-10-31

If you hover an icon and the topbar gets hidden while your mouse is still over it (e.g. clicking an icon that opens a page which calls Icon.setTopbarEnabled(false)) the icon comes back still looking hovered once the topbar is enabled again even with your mouse nowhere near it

A simple fix:

local isViewingWithMouse = false
clickRegion.MouseEnter:Connect(function()
	local dontSetState = UserInputService.PreferredInput ~= preferredInput.desktop
	isViewingWithMouse = true
	viewingStarted(dontSetState)
end)
janitor:add(UserInputService.InputChanged:Connect(function(input)
	if not (self.isViewing and isViewingWithMouse) or input.UserInputType ~= Enum.UserInputType.MouseMovement then
		return
	end
	local point = input.Position
	local position = clickRegion.AbsolutePosition
	local size = clickRegion.AbsoluteSize
	local isOver = point.X >= position.X and point.X <= position.X + size.X and point.Y >= position.Y and point.Y <= position.Y + size.Y
	if not isOver then
		viewingEnded()
	end
end))
self.viewingEnded:Connect(function()
	isViewingWithMouse = false
end)

Comments

No comments yet.