angularjs - ng-mousedown handler attaching to ng-mouseup's event -


i trying use ng-mousedown , ng-mouseup in concert, ng-mousedown firing twice , ng-mouseup not firing @ all. example, following code causes count increment 2 instead of going on press , down on release:

<!doctype html> <html>   <body ng-app>     <div>       <div style="background-color: blue; width: 80px;" ng-mousedown="count = count + 1" ng-mouseup="count = count - 1" ng-init="count=0">click me</div>       <div>{{count}}</div>     </div>     <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>   </body> </html> 

if change angular version 1.1.1 works expected. doing wrong or bug in angular? i've tested in chrome , firefox. works in firefox, not chrome.

update: after further testing appears may fail work in chrome on linux 64. might bug in chrome.

i loaded test file chrome directly , found worked expect. when compared 1 loaded via local webserver, found following line injected html:

<div id="__ngbatarangelement" style="display: none;">{"id":1,"time":18.12599998083897,"event":"scope:apply"}</div> 

that made me suspect angularjs tab in dev tools. sure enough, disabling "fixed" page:

batarang fail

what more disconcerting fact distinctly remember choosing not install batarang due universal negative reviews. guess have add mine pile.

update: found issue has been reported https://github.com/angular/angularjs-batarang/issues/205


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -