BUG: menuToggle receiving mouseEvent from 2nd window?


#1

I’m testing an app from multiple windows, one with a signed in user and another (anonymous window) with no user. But I’m getting menuClose events that cross both windows. Has anyone else seen this? It doesn’t replicate in codepen.

.directive('menuToggle', function() {
  return {
    restrict: 'AC',
    link: function($scope, $element, $attr) {
      $scope.$on('$ionicView.beforeEnter', function(ev, viewData) {
        if (viewData.enableBack) {
          var sideMenuCtrl = $element.inheritedData('$ionSideMenusController');
          if (!sideMenuCtrl.enableMenuWithBackViews()) {
            $element.addClass('hide');
          }
        } else {
          $element.removeClass('hide');
        }
      });

      $element.bind('click', function() {
        var sideMenuCtrl = $element.inheritedData('$ionSideMenusController');
        sideMenuCtrl && sideMenuCtrl.toggle($attr.menuToggle);
      });
    }
  };
});

#2

dooh! I was using browser-sync.

use browserSync.init({ghostMode: false}) to disable