Mouse.current.delta.x.ReadValue() randomly jumps on WebGL Chrome

I’m using the new input system to read mouse input for controlling a camera. The actual code I’m using is a little all over the place, but the end result is in Update() I’m reading Mouse.current.delta.x.ReadValue() (same with y).
It works fine mostly, but on chrome web builds specifically, the mouse occasionally jumps 700 pixels. Like I’ll read the value to be in the 0-10 range but for one frame it reads -721 or something.
I’m using the latest Unity 2021 build and latest chrome on windows 10.
My Cursor.lockState is set to CursorLockMode.Locked.

Has anyone experienced anything similar?

oh, input system on 1.3.0 also

Please report this bug.

Hi, any news regarding this? Thanks

There is going to be no news unless someone reports it…

I’m also encountering the same issue.

It’s occuring both with the new and old input systems.

Specifically it’s only occuring with CursorLockMode.Locked in WebGL. It seems to be resetting the mouse position based on the size of the webgl canvas. As in when the mouse travels some percentage of either the height or width, it will jump a delta proportional to those dimensions.

I have an ultrawide monitor so I get small jumps on the Y axis when a move the mouse a little bit, and very large jumps on the x axis when I move the mouse a decent distance.

2022.3 LTS

A workaround for anyone struggling (this is actually more of a browser bug and not a unity bug):

private const float threshold = 90f;
float AvoidFlicks(float currentDeltaX)
{
    if (Mathf.Abs(currentDeltaX - prevDeltaX) > threshold)
        return prevDeltaX;
    prevDeltaX = currentDeltaX;
    return currentDeltaX;
}

then use it freely like this (this one with the old input system for simplicity):

void Update()
{
    var mouseDelta = new Vector2(AvoidFlicks(Input.GetAxisRaw("Mouse X")), Input.GetAxisRaw("Mouse Y"));
}

The problem is reduced when mouse report rate is lower from 1000hz to 500hz, and problem can’t be observed with 250hz
I’m using Logitech G305. Are you guys using high report rate mouse too?