From ea6fed127be7d975456b050f2f575b166a1eace7 Mon Sep 17 00:00:00 2001 From: pengx17 Date: Mon, 30 Dec 2024 06:54:02 +0000 Subject: [PATCH] fix(editor): tooltip styles when having span tags (#9422) fix AF-2040 --- blocksuite/affine/components/src/toolbar/tooltip.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/blocksuite/affine/components/src/toolbar/tooltip.ts b/blocksuite/affine/components/src/toolbar/tooltip.ts index 6eb2c7c116..49b9ca2c63 100644 --- a/blocksuite/affine/components/src/toolbar/tooltip.ts +++ b/blocksuite/affine/components/src/toolbar/tooltip.ts @@ -25,11 +25,9 @@ const styles = css` color: var(--affine-white); background: var(--affine-tooltip); - display: flex; - justify-content: center; - align-items: center; overflow-wrap: anywhere; white-space: pre-wrap; + word-break: break-all; } .arrow { @@ -201,10 +199,8 @@ export class Tooltip extends LitElement { :host { z-index: ${unsafeCSS(this.zIndex)}; opacity: 0; - ${ - // All the styles are applied to the portal element - unsafeCSS(this.style.cssText) - } + // All the styles are applied to the portal element + ${unsafeCSS(this.style.cssText)} } ${this.allowInteractive