I have a peculiar behaviour on my Ubuntu 18.04. Once a browser (Firefox, Chrome or Opera) starts playing a youtube video, I cannot type anywhere, even in the youtube search input. I cannot type in another window (terminal or another browser). The mouse can click another window, which brings focus to it but cannot move it. However, clicking on the playing youtube video pauses/starts it fine. Clicking in the volume control of the playing video also works fine. It's as if Youtube has hijacks the mouse.
I have other Ubuntu 18.04 installations that work flawlessly without this problem. It's just happening on this one PC.
Note: Before playing a video, the mouse and keyboard behave as expected. Once a youtube video starts, boom. Once I kill the browser tab playing the youtube video, after about 5 seconds, the mouse and keyboard start working fine again.