Merge pull request #3501 from dpalou/MOBILE-4081

MOBILE-4081 external-content: Set attribute for untreated urls
main
Noel De Martin 2022-12-05 13:27:51 +01:00 committed by GitHub
commit db0b5ecb95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -210,6 +210,9 @@ export class CoreExternalContentDirective implements AfterViewInit, OnChanges, O
if (tagName === 'SOURCE') {
// Restoring original src.
this.addSource(url);
} else if (url && !this.element.getAttribute(targetAttr)) {
// By default, Angular inputs aren't added as DOM attributes. Add it now.
this.element.setAttribute(targetAttr, url);
}
throw new CoreError('Non-downloadable URL');