I'm using this code in the beginning of my
main()
val meta = document.createElement("meta")
meta.setAttribute("name", "viewport")
meta.setAttribute("content",
"width=" + (window.screen.width * window.devicePixelRatio) / 2 + ", initial-scale=1, maximum-scale=1, user-scalable=0")
document.head?.appendChild(meta)
window.addEventListener("resize", { _ ->
meta.setAttribute("content",
"width=" + (window.screen.width * window.devicePixelRatio) / 2 + ", initial-scale=1, maximum-scale=1, user-scalable=0")
})
However, the
, maximum-scale=1, user-scalable=0
is doing something odd and when I removed it the drifting disappears.