Skip to content

Commit

Permalink
fix: fix style of dom tooltip when tooltip has customized child, fix #…
Browse files Browse the repository at this point in the history
  • Loading branch information
xile611 committed Dec 27, 2024
1 parent a51bc2e commit ab1772c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,11 @@ export class DomTooltipHandler extends BaseTooltipHandler {
protected _updateDomStyle(sizeKey: 'width' | 'height' = 'width') {
const rootDom = this._rootDom;

const contentDom = rootDom.children[rootDom.children.length - 1];
const contentDom = [...(rootDom.children as any)].find(child =>
child.className.includes(TOOLTIP_CONTENT_BOX_CLASS_NAME)
);

if (contentDom.className.includes(TOOLTIP_CONTENT_BOX_CLASS_NAME)) {
if (contentDom) {
const tooltipSpec = this._component.getSpec() as ITooltipSpec;
const contentStyle: Partial<CSSStyleDeclaration> = {};

Expand Down

0 comments on commit ab1772c

Please sign in to comment.