Why focusing on input by default? ( android 4.3, Nightly build )

I just did a little hack/workaround in my app that suppresses this issue without really affecting the user experience. Basically the approach is to cover the inputs with an invisible div so that the input focus isn’t transferred and then hide this invisible div after half a second or so, before user would actually tap anything. Hacky, but works well enough for my app so far.

Here’s how it works:

  1. Add html like this somewhere in your view:

  2. Some css like this:

    .ghostclick-preventer { background-color: none; width: 100%; height: 100%; display: block; position: absolute; top: 0px; left: 0px; z-index: 3; }

  3. And lastly, in your controller add something like this:

    $timeout(function() {
    $scope.preventGhostClicks = false;
    }, 500);