python-eel / Eel

A little Python library for making simple Electron-like HTML/JS GUI apps
MIT License
6.44k stars 587 forks source link

VH and VW measurements don't use current window size #413

Open saintmuntzer opened 3 years ago

saintmuntzer commented 3 years ago

Eel version 0.14.0

Describe the bug When using vw and vh measurements in CSS, the page renders as though the size of the browser window is equal to the current display resolution, regardless of how large the browser window actually is. For example, if my display's resolution is set to 1920x1080, the vw and vh measurements will be calculated as 1920 and 1080, respectively. Whether the window starts in a smaller size or I resize it while Eel is running, the measurements stay the same. This also affects vmin and vmax measurements.

This bug seems to appear only when Eel is using the Chrome browser. Likely related to issue #401.

To reproduce Style any HTML element using vw or vh measurements and open the page with Eel using the Chrome browser.

Expected behavior vw and vh reflecting the current size of the browser window.

Desktop: