Skip to content

[Web] Input.mouse_mode returns wrong value #100758

Open
@matmas

Description

Tested versions

  • Reproducible in v4.4.dev4.official [36e6207]
  • Reproducible in v4.4.dev7.official [46c8f8c]
  • Not reproducible in v4.4.dev3.official [f4af820]

System information

Godot v4.4.dev4 - CachyOS Linux #1 SMP PREEMPT_DYNAMIC Thu, 19 Dec 2024 21:23:18 +0000 on Wayland - X11 display driver, Multi-window, 1 monitor - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 2070 SUPER (nvidia; 565.77) - Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 threads), Web export tested under Firefox 133.0.3 (64-bit)

Issue description

In web exports Input.mouse_mode sometimes returns MouseMode.MOUSE_MODE_VISIBLE despite setting it to MouseMode.MOUSE_MODE_CAPTURED and behaving like it is captured.

Steps to reproduce

  1. open "Window Management" from official demo projects
  2. add web export, run the project in browser (Remote Debug)
  3. click on the MOUSE_MODE_CAPTURED button or press F3
  4. Extra hints should appear below all the MouseModes buttons:

ESC: Deactivate MOUSE_MODE_CAPTURED
W, S: Move forward, backward
A, D: Strafe left, right

At least they do in v4.4.dev3 but not in v4.4.dev4 anymore since the condition Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED evaluates to false.

There is a case, when this evaluates to true:

  1. run the project in browser anew or refresh the page
  2. click somewhere inside the window, on the cube for example
  3. press F3, F1, F3 in that order.
  4. Notice extra hints being shown also in v4.4.dev4 or v4.4.dev7

Minimal reproduction project (MRP)

"Window Management" official demo project (https://github.com/godotengine/godot-demo-projects/tree/master/misc/window_management)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Unassessed
    • Status

      For team assessment

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions