Completed
Last Updated: 22 Jun 2022 08:18 by ADMIN
Release R3 I1 June 2022
Shashwat
Created on: 12 May 2022 11:27
Category: Tooltip
Type: Bug Report
0
Native Tooltip doesn't appear correctly when applied to Icon or SVG

Describe the bug
Then using the Native Tooltip with Icon tag or SVG, the component is displayed aside from the hovered element.

To Reproduce

  1. Open this StackBlitz example
  2. Hover either the Icon element or the SVG

Expected behavior
The Tooltip should appear exactly below the hovered element.

Screenshots
Icon:
image
SVG:
image

3 comments
ADMIN
Plamen
Posted on: 26 May 2022 10:50

Hi,

Sorry for not describing the second point deep enough.

I have added the following CSS at the bottom of the App.vue in order to prevent the pointer events inside of the two primary buttons:

<style>
.bi-app-indicator {
  pointer-events: none;
}
</style>

And here is the definition of the Tooltip:

  <Tooltip
      :anchor-element="'target'"
      tooltipClassName="shadow-sm"
      :setCalloutOnPositionAuto="'50%'"
      :parentTitle="true"
      :position="'bottom'"
    >

https://stackblitz.com/edit/vue-nfx4ya?file=src%2FApp.vue

If we don't add this CSS the tooltip will hide and then again appear when having the inner icon - so you can choose which behavior suits you better.

If we want to have tooltip centred even when we remove the label we also have to set some position as 'bottom' for example - otherwise the tooltip is position with 'auto' as it is explained in 1). 

If you have further questions or still observe unusual behavior please let us know again so we could inspect it once again.

Regards,
Plamen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Shashwat
Posted on: 26 May 2022 08:50

Understand about the first point: about missing of 'position' option.

For second point: I am unable to find changes that disable pointer events in the second snippet. Could you please confirm what I should look at?

Also, if I remove the label of the button in your second code snippet (only keep the icon), even then the label isn't at the center.

ADMIN
Plamen
Posted on: 26 May 2022 05:51

Hello,

By default the position of the tooltip is 'auto' and in this case it is positioning itself so that is is visible on the screen. Having this in mind this positioning is expected with this setting. If we want to position the tooltip so that it is pointing the icon we can set the position to 'bottom' for example - :position="'bottom'" - https://stackblitz.com/edit/vue-faurrm?file=src%2FApp.vue

If we have an internal item and we don't want it to be different than its parent we ca add the pointer-events: none; to the child element as for example it is done in this example - https://stackblitz.com/edit/vue-xkmrkn?file=package.json,public%2Findex.html,src%2FApp.vue

 

Regards,
Plamen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.