When I use a Windows 10 client in windowed mode, press and hold my LMB, move my cursor out of frame, release the LMB, and move my cursor back into the frame,
UserInputService continues to report the mouse button as being down. Note that I have tried to test this in Roblox Studio on MacOS and the problem did not exist there. Also note that at no point during these steps did focus change to a different window / program.
I have created a very simple repro file. It has the following contents in a
LocalScript placed under
local UserInputService = game:GetService("UserInputService") UserInputService.InputChanged:Connect(function(inputObject) if inputObject.UserInputType ~= Enum.UserInputType.MouseMovement then return end print("Left mouse button is currently", UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) and "down" or "up") end)
If you publish this file to a place, jump into that place in a Windows 10 client, press F9 to bring up the developer console, scroll to the bottom of the developer console’s output, and follow the steps outlined above, you should expect to see that when your mouse comes back into the frame after releasing LMB outside of the frame that the output gets new lines saying
Left mouse button is currently up, but instead you will see
Left mouse button is currently down, despite having released the LMB.
MouseButton1DownOutsideWindowBug.rbxl (18.3 KB)