Prevent switch to edit mode when a user clicks on a link (#4661)
* prevent formattable field from switching to edit mode if the user clicks a link * no need for ...pull/4664/head
parent
d471a04815
commit
86d03c301e
@ -1,4 +1,4 @@ |
||||
<span> |
||||
<span ng-bind-html="$ctrl.displayText"></span> |
||||
<span ng-bind-html="$ctrl.displayText" wp-display-formattable-field-helper></span> |
||||
</span> |
||||
|
||||
|
@ -0,0 +1,17 @@ |
||||
export class WpDisplayFormattableFieldHelper { |
||||
constructor(protected $scope, |
||||
protected $element) { |
||||
$element.on('click', 'a', function (evt) { |
||||
evt.stopPropagation(); |
||||
}); |
||||
} |
||||
} |
||||
|
||||
function wpDisplayFormattableFieldHelper():ng.IDirective { |
||||
return { |
||||
restrict: 'A', |
||||
controller: WpDisplayFormattableFieldHelper |
||||
}; |
||||
} |
||||
|
||||
angular.module('openproject.workPackages.directives').directive('wpDisplayFormattableFieldHelper', wpDisplayFormattableFieldHelper) |
Loading…
Reference in new issue