Sha256: a70d636a5c5113f3ce536df1af1edcf44c3e2497ce43dd1a608a5f0d05e51c25
Contents?: true
Size: 797 Bytes
Versions: 211
Compression:
Stored size: 797 Bytes
Contents
(function () { /** * @ngdoc directive * @name Bastion.utils.directive:stopEvent * * @description * Prevents an event from propagating. This is basically a hack to work around * https://github.com/angular-ui/bootstrap/issues/2017 which causes clicks to * inputs inside of ui-modal to cause a loss of focus on the input. * * @example * <input type="text" stop-event="click"/> */ function stopEvent() { return { restrict: 'A', link: function (scope, element, attr) { element.on(attr.stopEvent, function (e) { e.stopPropagation(); }); } }; } angular.module('Bastion.utils').directive('stopEvent', stopEvent); })();
Version data entries
211 entries across 211 versions & 2 rubygems