LadybirdBrowser / ancient-history

The Ladybird web browser
BSD 2-Clause "Simplified" License
1.62k stars 102 forks source link

Pressing backwards and forwards buttons on the mouse causes as assertion failure #27

Closed Lubrsi closed 2 years ago

Lubrsi commented 2 years ago

When I press back or forward on my mouse, Ladybird crashes with:

ladybird: /home/lukew/Desktop/serenity-project/serenity/Userland/Libraries/LibWeb/UIEvents/MouseEvent.cpp:40: i16 Web::UIEvents::determine_button(unsigned int): Assertion `false' failed
diegoiast commented 2 years ago

We are probably returning 0 here: https://github.com/awesomekling/ladybird/blob/9e3a1f47d484cee6f23c4dae6c51750af155a8fc/WebView.cpp#L379-L388

Can you try this branch, and see if it works for you? If it does, I will make a PR.

https://github.com/elcuco/ladybird/tree/27-mouse-buttons-crash

Direct link to the fix: https://github.com/elcuco/ladybird/commit/e6c446342cdb64bf279664bb611021eca09b78d3