简体   繁体   中英

tippy tooltip position with browser zoom in/out

I have made a popover with tippyjs . Tippy takes next options:

const tippyInstance: any = tippy(element, {
            content: loaderTemplate,
            placement: 'right',
            animation: 'fade',
            animateFill: false,
            theme: 'kpi-tooltip',
            trigger: 'manual',
            interactive: true,
            onHidden: () => {
                tippyInstance.destroy();
            },
            allowHTML: true
        });

"Element" is a plain html element and content loading after response from server. The problem is when i make browser zoom in or zoom out the tooltips changes position. I'm using chrome last version.

Tooltip in normal state: 在此处输入图像描述 Tooltip with zoom in: 在此处输入图像描述

"appendTo" property option solved the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM