Derived from https://phaser.discourse.group/t/html-popup-inputbox-with-scaling-for-v3/1354 porting to Phaser CE.
Because v2’s onSizeChange does not trigger if only the window resized while not affecting the canvas, it requires a work around using
window.addEventListener("resize", () => setTimeout(() => handleScale(), 100));
Not sure if there is a better way doing this.