Skip to content

Instantly share code, notes, and snippets.

@leshido
Last active February 19, 2017 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leshido/190806a04a6b1d95bffd to your computer and use it in GitHub Desktop.
Save leshido/190806a04a6b1d95bffd to your computer and use it in GitHub Desktop.
Fixes Samsung Galaxy S2 & S3 Android Browser rendering freezes on touch bug
// Resize document width to fix Samsung Galaxy stock-browser render freeze on touch bug:
if (/Android/.test(navigator.userAgent) && !(/Chrome/.test(navigator.userAgent)))
{
var ds = document.documentElement.style;
var origW = ds.width;
ds.width = "101%";
setTimeout(function() { ds.width = origW; }, 500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment