diff --git a/projects/line-truncation-lib/src/lib/line-truncation.directive.ts b/projects/line-truncation-lib/src/lib/line-truncation.directive.ts index bf5aa42..d820f5f 100644 --- a/projects/line-truncation-lib/src/lib/line-truncation.directive.ts +++ b/projects/line-truncation-lib/src/lib/line-truncation.directive.ts @@ -121,6 +121,8 @@ export class LineTruncationDirective setTimeout(() => { // Recursively call the truncate itself if Client Height is not ready if (element.clientHeight > 0) { + // backup original element before truncation + this.elementClone = element.cloneNode(true); const contentHeight = getContentHeight(element); const lineHeight = getLineHeight(element); const targetHeight = this.lines * lineHeight;