Disable “pull to refresh” in Chrome for Android

In mobile Chrome, pulling the top of the page will reload it. Although it’s a convenient UI pattern, it might get in the way if you are trying to implement gestures in your app. After careful observation, I have come up with a simple solution. AngularJS I have successfully disabled “pull to reload” with this […]

input.select() does not work on iOS

The recommended method to give a text field focus and select its contents is the following: document.getElementById(‘myInput’).select(); However, this does not work in iOS. The correct way to do it is to use setSelectionRange on an already focused input. var input = document.getElementById(‘myInput’); input.focus(); input.setSelectionRange(0,99999); setSelectionRange will not work on iOS if the element doesn’t […]

What is “ReferenceError: Can’t find variable: __gCrWeb”?

I have seen this error in our Sentry logs, and after some research, it appears to be an error that can safely be ignored. It only happens in Chrome on iOS, most likely at random, and it is seemingly unrelated to the page being viewed. It has been tweeted about, but there doesn’t seem to […]

Disabling font zooming in Chrome on Android

If you are here, you have probably tried disabling font zooming by using -webkit-text-size-adjust:100% and discovered it didn’t work. Chrome conveniently ignores this non-standard property, so you need to use an inconvenient hack to disable what is called font boosting by adding the following line to your CSS file: html * {max-height:1000000px;} Your fonts should […]

Twitter apps and localhost

If you have tried creating a Twitter app with localhost as the callback URL, you might have received an URL invalid error message. All you have to do is use http://127.0.0.1 instead. Simple, isn’t it?

How to launch the Windows Phone Emulator without Visual Studio

Here’s a simple trick that lets you launch the Windows Phone 8 Emulator without using Visual Studio 2012. It’s quite simple: Open “Command Prompt” in Administrator mode (right click on it on the Start page icon, choose Run as administrator) Launch the emulator using the following command (with quotes): “C:\Program Files (x86)\Microsoft XDE\8.0\xde” -vhd “C:\Program […]