1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 17:53:39 +00:00

stop click directive instead of inline js

This commit is contained in:
Kyle Spearrin
2017-06-09 15:14:36 -04:00
parent d6f1a55d30
commit 5409ba7737
5 changed files with 16 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
angular
.module('bit.directives')
// ref: https://stackoverflow.com/a/14165848/1090359
.directive('stopClick', function () {
return function (scope, element, attrs) {
$(element).click(function (event) {
event.preventDefault();
});
};
});