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:
11
src/popup/app/directives/stopClickDirective.js
Normal file
11
src/popup/app/directives/stopClickDirective.js
Normal 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();
|
||||
});
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user