10758 Caption will now be correctly set when passing in a target to the media picker.

This commit is contained in:
Robert Ghafoor
2021-07-30 09:34:14 +02:00
committed by emma-hq
parent 3b227b9c67
commit 168abbf2f7

View File

@@ -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
@@ -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();