mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
c16d0c5a39
# Objective - On Safari mobile, calling `winit_window.set_cursor_grab(true)` fails as the API is not implemented (as there is no cursor on Safari mobile, the api doesn't make sense there). I don't know about other mobile browsers ``` [Error] Unhandled Promise Rejection: TypeError: getObject(arg0).exitPointerLock is not a function. (In 'getObject(arg0).exitPointerLock()', 'getObject(arg0).exitPointerLock' is undefined) (anonymous function) (rect.js:1089) wasm-stub <?>.wasm-function[web_sys::features::gen_Document::Document::exit_pointer_lock::h20ffc49be163fc45] <?>.wasm-function[winit::platform_impl::platform::backend::canvas::Canvas::set_cursor_grab::h6a9472cf55263e98] <?>.wasm-function[bevy_winit::winit_windows::WinitWindows::create_window::h9db5b3cbb24347c5] <?>.wasm-function[<bevy_winit::WinitPlugin as bevy_app::plugin::Plugin>::build::ha4a7c046b80c4280] <?>.wasm-function[bevy_app::plugin_group::PluginGroupBuilder::finish::h0e5bc78f71c37b2f] <?>.wasm-function[rect::main::h899852fd17f2d489] <?>.wasm-function[std::sys_common::backtrace::__rust_begin_short_backtrace::hfe38f282e8dda96b] <?>.wasm-function[std::rt::lang_start::{{closure}}::hc2f3b555ffc58618] <?>.wasm-function[std::rt::lang_start_internal::ha901ae30d88554f2] <?>.wasm-function[main] <?>.wasm-function[] wasm-stub 21261 (anonymous function) (rect.js:1664) asyncFunctionResume (anonymous function) promiseReactionJobWithoutPromise promiseReactionJob ``` ## Solution - Do not call the api to release cursor grab on window creation, as the cursor is not grabbed anyway at this point |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |