Last active
February 19, 2017 14:03
-
-
Save leshido/190806a04a6b1d95bffd to your computer and use it in GitHub Desktop.
Fixes Samsung Galaxy S2 & S3 Android Browser rendering freezes on touch bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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