$event.stopPropagation(); not working on firefox

756 views Asked by At
    <li ng-repeat="chat in openedChats track by $index" ng-click="init($index,'maximize')" role="button">
        <button class="minimized-chat-box" >
        <label style="float:left;color:white"><strong>{{chat.NAME}}</strong></label>
        <i class="fa fa-remove" style="color:white;float:right;font-size:14px;" role="button" ng-click="init($index,'close');$event.stopPropagation();">
        </i>
        <i class="fa fa-window-maximize" style="color:white;float:right;font-size:14px" role="button" ng-click="init($index,'maximize');$event.stopPropagation();">
        </i>
        </button>
    </li>

This is the code I have for making the icons inside the button clickable and it works fine on chrome, It stops working on firefox, Is there a way I can modify it to work on both. I really couldnt find one way to make it work for both!

Thanks in advance. I'm new to angularjs and I'd love to use angular to do this.

1

There are 1 answers

2
yesIcan On BEST ANSWER

try this

$scope.init = function($event,$index,'maximize'){
$event.stopPropagation();
};

then call this like

ng-click="init($event,$index,'close')