这里的代码在Chrome和Safari上完美运行。在Firefox中, $ event.stopPropagation()调用存在问题,该调用没有任何影响
<md-content layout-padding style="height: 450px;padding: 24px;">
<md-list-item class="md-3-line" ng-repeat="user in usersController.usersList" ng-click="usersController.onItemListUserPressed(user)">
<ng-md-icon icon="person" size="100" style="margin-right:2%;"></ng-md-icon>
<div class="md-list-item-text" >
<h3>{{globalController.strings.Id}}: {{ user.ID_User }}</h3>
<h4>{{globalController.strings.Code}}: {{ user.UserCode }}</h4>
<p>{{globalController.strings.Username}}: {{ user.UserName }}</p>
<div layout="row" layout-align="end end">
<ng-md-icon icon="delete" style="fill: red;" size="30" ng-click="usersController.onButtonDeleteUserPressed(user, $event);$event.stopPropagation()"></ng-md-icon>
</div>
<md-divider ></md-divider>
</div>
</md-list-item>
我使用$ event.stopPropagation()来停止父进程的调用 ng-click =“usersController.onItemListUserPressed(user)”方法, 当 ng-click =“usersController.onButtonDeleteUserPressed(user,$ event)”被触发时。
有人有想法如何解决这个问题吗?