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.
Its definitly an error in the last update. screen.availWidth, screen.availHeight, screen.width and scrren.height have to be constant. My application will not work any more with brave. It would be great, if this bug would be fixed in the next update.
I just found that the values of screenX and clientX (and Y) are wrong. It seems to me that the values are based on the acutal window instead of the screen.
This is a new fingerprinting protection we are rolling out. It is currently at 50% in Desktop Release and will be at 100% in a couple of weeks. For details please see https://github.com/brave/brave-browser/issues/23170.
@datenschvtz are you able to share more about your application and how we might find a workaround?
The application uses screenX/Y for determining the mouse position for the displaying of context menus. With screen.width (availWidth) will be ensured the the menus are visible on screen.