browser icon indicating copy to clipboard operation
browser copied to clipboard

onResize not returning the right height when embedded in "Chrome Custom Tabs"

Open lucamug opened this issue 5 years ago • 0 comments
trafficstars

We experienced a case where the height returned by Browser.Events.onResize was 0 instead of the actual height.

The method to get width and height described in https://stackoverflow.com/questions/1248081/get-the-browser-viewport-dimensions-with-javascript seems giving more accurate results:

var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);

We didn't test this method but in general we were wondering if this could be a safer approach...

lucamug avatar Nov 25 '19 06:11 lucamug