Skip to content

Commit

Permalink
10758 Caption will now be correctly set when passing in a target to t…
Browse files Browse the repository at this point in the history
…he media picker.
  • Loading branch information
Robert Ghafoor authored and emma-hq committed Jul 30, 2021
1 parent 3b227b9 commit 168abbf
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ angular.module("umbraco")
var originalTarget = $scope.target;
var id = $scope.target.udi ? $scope.target.udi : $scope.target.id;
var altText = $scope.target.altText;
var caption = $scope.target.caption;

// ID of a UDI or legacy int ID still could be null/undefinied here
// As user may dragged in an image that has not been saved to media section yet
Expand All @@ -181,6 +182,7 @@ angular.module("umbraco")
$scope.target.url = mediaHelper.resolveFileFromEntity(node);
$scope.target.thumbnail = mediaHelper.resolveFileFromEntity(node, true);
$scope.target.altText = altText;
$scope.target.caption = caption;
$scope.target.focalPoint = originalTarget.focalPoint;
$scope.target.coordinates = originalTarget.coordinates;
openDetailsDialog();
Expand Down

0 comments on commit 168abbf

Please sign in to comment.