Skip to content

Commit

Permalink
[SITES-21939] Alt Text not persisting in Page Properties for Featured…
Browse files Browse the repository at this point in the history
… Image (adobe#2759)

Co-authored-by: Egor_Cheptsov
Adding additional check, in case we are opening dialog for Page component image section and in that case updating value of remoteFileReference in order to execute retrieveInstanceInfo correctly for page component and update alt text field in dialog
  • Loading branch information
YahorC authored May 28, 2024
1 parent d844a0e commit bfc2bd6
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,13 @@
// we need to get saved value of 'smartCropRendition' of Core Image component
smartCropRenditionFromJcr = data["smartCropRendition"];
}
if (filePath.endsWith("/cq:featuredimage")) {
remoteFileReference = data["fileReference"];
}
// we want to call retrieveDAMInfo after loading the dialog so that saved smartcrop rendition of remote asset
// can be shown on initial load.
if (remoteFileReference && remoteFileReference !== "" && remoteFileReference.includes("urn:aaid:aem")) {
// can be shown on initial load. Also adding condition filePath.endsWith("/cq:featuredimage") to trigger alt
// update for page properties.
if (remoteFileReference && remoteFileReference !== "" && (remoteFileReference.includes("urn:aaid:aem") || filePath.endsWith("/cq:featuredimage"))) {
retrieveDAMInfo(remoteFileReference);
}
});
Expand Down

0 comments on commit bfc2bd6

Please sign in to comment.