recently i noticed an issue with my firefox freezing when highlighting text (though i thought it was when i was copying it). luckily its and easy fix if you're using arch linux or an arch based distro
open your terminal and enter this command to install a patched version of the libx11 package paru -S libx11-firefox-fix
(replace paru with your aur helper)
then just reload your x11 session which you can achieve generally by just logging out
this issue is being tracked here and i recommended checking up on the thread
once this bug has been fixed you will need to replace the libx11-firefox-fix package with the normal libx11 package to stay up to date by reinstalling it with
paru -S libx11
(replace paru with your aur helper)