The problem arises because the event blur(always) fires before the event click.
blur , $scope.enabled false, , click .
- , () blur, ng-mousedown
, , :
ng-click="reset();">
ng-mousedown="reset();">
.
, .
X , .
, :
style="position:relative;right:15px;top:1px;cursor: pointer;cursor: hand;"
<i>.
angular directive clear field.
click mousedown, , .
DOM, .
----------
:
I ( ) , Cordova , .
mousedown, mouseup mousemove.
touchstart mousedown, ng-mousedown="reset();"> ng-touchstart="reset();">;
ng-touchstart , github repo ββ, :
.directive("ngTouchstart", function () {
return {
controller: function ($scope, $element, $attrs) {
$element.bind('touchstart', onTouchStart);
function onTouchStart(event) {
var method = '$scope.' + $element.attr('ng-touchstart');
$scope.$apply(function () {
eval(method);
});
};
}
};
});
Cordova, ...
----------
: , , :
" , - , ng- ? , reset bind, , ."
", , ios."
HTML-.
: " reset, ... I.e. "
, , : reset , ; ng-click ng-mousedown, , , .
, .
ios. iPad: . , , , , .
, , , .
, ; / , .
, ...