From 04d1fbb716bc7676c60a009906e183bb3cbb6047 Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Fri, 3 Mar 2023 17:15:23 +1000 Subject: [PATCH] [AC-1084] Don't copy hidden spaces when selecting password (#4848) * Don't copy hidden spaces when selecting password Co-authored-by: Andreas Coroiu * [AC-1084] fix: remove whitespaces from inline component --------- Co-authored-by: Andreas Coroiu Co-authored-by: Andreas Coroiu --- .../src/color-password/color-password.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/components/src/color-password/color-password.component.ts b/libs/components/src/color-password/color-password.component.ts index 8ebb29a31e8..14b825df715 100644 --- a/libs/components/src/color-password/color-password.component.ts +++ b/libs/components/src/color-password/color-password.component.ts @@ -11,7 +11,7 @@ enum CharacterType { @Component({ selector: "bit-color-password", - template: `
@@ -19,7 +19,8 @@ enum CharacterType { {{ i + 1 }} -
`, + `, + preserveWhitespaces: false, }) export class ColorPasswordComponent { @Input() private password: string = null; @@ -44,10 +45,11 @@ export class ColorPasswordComponent { getCharacterClass(character: string) { const charType = this.getCharacterType(character); - const charClass = this.characterStyles[charType].concat("tw-inline-flex"); + const charClass = this.characterStyles[charType]; if (this.showCount) { return charClass.concat([ + "tw-inline-flex", "tw-flex-col", "tw-items-center", "tw-w-7",