Description of the issue:
In JavaScript, screen.width and screen.height are supposed to report your monitor size. It does under Chrome and Firefox but is in error under Brave. With Brave, the values change when you resize the window. It shouldn’t. The monitor (screen) size is a constant.
Steps to Reproduce (add as many as necessary): 1. 2. 3.
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Device Information</title>
<script>
function updateInfo() {
document.body.innerHTML = `Display size = ${screen.width}x${screen.height}<br>Window size = ${window.innerWidth}x${window.innerHeight}`;
window.onresize = updateInfo;
}
</script>
</head>
<body onload="updateInfo()" style="font-size: medium;">
</body>
</html>
Actual Result (gifs and screenshots are welcome!):
screen.width and screen.height change when the browser is resized.
Expected result:
They should be constant because the screen/monitor size is constant.
Reproduces how often:
Every time.
Operating System and Brave Version(See the About Brave page in the main menu):
64-bit Linux. Brave 1.45.123 Chrome 107.0.5304.110 Official Build 64-bit
Additional Information: