Not sure if anybody can help me here, I will probably have to come up with something different but I wanted to sound this issue since I didn't find anything like that here.
I have an app-like website with swipable menu, and I want it to go away whenever user taps somewhere outside the menu. So I've used ngTouch for swiping and attached ng-click="menuToggled = false" to close menu on click/tap.
However if ng-click is attached to body, links in the menu don't work and I cannot focus any of the input fields on the body.
This only happens on mobile devices: iOS or Android (or chrome device emulation).
As I said, I will probably have to think of another solution to close menu on tap, but this issue seems strange to me, perhaps somebody has some thoughts on it.
Here's a simple demo, as I said, it works on desktop but if you enable device emulation with F12 on Chrome you will not be able to focus input field, unless you hold mouse button:
<body ng-app="myApp" ng-click="showMenu = false">
<input type="text">
<button type="button" ng-click="showMenu = true; $event.stopPropagation();">Show menu</button>
<div class="menu" ng-show="showMenu"></div>
</body>
I can't explain the real cause of your original problem. seems that ng-click on body tag is not a good idea - i think it steals focus in some ways..
i have put together a someway complex solution - but it works on desktop and emulated mobile - tested in Firefox - and handles the 'click + touch' problem:
http://jsfiddle.net/s_light/L85g3grs/6/
setup the click event on the button:
and add the handling in your controller: