Use of &mut Context
from EventHandler
causes BorrowedMutError
in wasm
#373
Labels
bug
Something isn't working
On wasm, when
GraphicsContext::get_clipboard
is called from inside eitherEventHandler::mouse_button_down_event
orEventHandler::key_down_event
(but likely all event handlers which take a&mut Context
), it causes a panic by RefCellBorrowedMutError
.Can be reproduced using this code
(master branch of miniquad patched in using cargo patch)with current version of macroquad on crates.io:Compiling for wasm, running the program, then pressing a key while focused on the window causes the panic.
Initially discovered in optozorax/egui-macroquad#34
The text was updated successfully, but these errors were encountered: