I have created a directive in angularJS which have an HTML table that's need to be hidden in some cases. I want to hide the table when there is a click anywhere on the page but the table itself. I did it like this, I set attribute tabindex (-1) on table then added ng-blur function. Its work fine in chrome and Firefox but i am having an issue with IE 11, when i click on the table it hide itself.
my code:
HTML:
<table id="WizardGrid" tabindex="-1" class="table table-striped table-bordered table-condensed table-hover" ng-blur="vm.onBlur($event)">
controller:
self.onBlur = function ($event) {
self.showWizardWindow = false;
console.log($event);
};
In the end what i want is to focus on the table and on lost focus to hide, when i click on the table (tr, td etc.) to stay in show mode.