From 5384d42391650b7196c4940fc3fc50ce053cc95f Mon Sep 17 00:00:00 2001 From: Patrick Cauley Date: Mon, 18 Aug 2014 18:35:58 -0400 Subject: [PATCH] Fixed tab going to next tab index --- src/mentio.directive.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mentio.directive.js b/src/mentio.directive.js index 6057e31..0632252 100644 --- a/src/mentio.directive.js +++ b/src/mentio.directive.js @@ -13,7 +13,7 @@ angular.module('mentio', []) ngModel: '=' }, controller: function($scope, $timeout, $attrs) { - + $scope.query = function (triggerChar, triggerText) { var remoteScope = $scope.triggerCharMap[triggerChar]; remoteScope.showMenu(); @@ -175,6 +175,7 @@ angular.module('mentio', []) var activeMenuScope = $scope.getActiveMenuScope(); if (activeMenuScope) { if (event.which === 9) { + event.preventDefault(); activeMenuScope.selectActive(); } @@ -364,7 +365,7 @@ angular.module('mentio', []) if (mentioAttr !== undefined) { // send own scope to mentio directive so that the menu // becomes attached - $rootScope.$broadcast('menuCreated', + $rootScope.$broadcast('menuCreated', { targetElement : scope.forElem, scope : scope