The RadzenTooltip is not showing when I put the <RadzenTooltip/> in the _Layout.cshtml #739

Closed
opened 2026-01-29 17:42:34 +00:00 by claunia · 2 comments
Owner

Originally created by @PaulSinnema on GitHub (Feb 17, 2023).

Describe the bug
The RadzenTooltip is not showing when I put the < RadzenTooltip /> in the _Layout.cshtml and hover over the component that call the ShowTooltip although the routine is called.

To Reproduce
Steps to reproduce the behavior:

  1. Do all the steps described in the Get Started documentation (In there it states you should add the < RadzenTooltip /> to the _MainLayout.razor. I'm writing a server hosted Blazor application which does not have that, it has a _Layout.cshtml so I put it in there.
  2. Create a Blazor page and add the following code:
        <RadzenIcon Icon="assignment" MouseEnter="@(args => @ShowTooltip(args))" />

        void ShowTooltip(ElementReference elementReference) => tooltipService.Open(elementReference, "Some content", new TooltipOptions() { Position = TooltipPosition.Top });
  1. Run the program and hover over the icon with your mouse.
  2. No Tooltip is shown.

If however I place the < RadzenTooltip /> tag inside the page that is rendered the tooltip does show.

Expected behavior
Tooltip should show on hover over the component.

  • OS: Windows 11
  • Browser FireFox
  • Version v4.7.1
Originally created by @PaulSinnema on GitHub (Feb 17, 2023). **Describe the bug** The RadzenTooltip is not showing when I put the < RadzenTooltip /> in the _Layout.cshtml and hover over the component that call the ShowTooltip although the routine is called. **To Reproduce** Steps to reproduce the behavior: 1. Do all the steps described in the Get Started documentation (In there it states you should add the < RadzenTooltip /> to the _MainLayout.razor. I'm writing a server hosted Blazor application which does not have that, it has a _Layout.cshtml so I put it in there. 2. Create a Blazor page and add the following code: ``` <RadzenIcon Icon="assignment" MouseEnter="@(args => @ShowTooltip(args))" /> void ShowTooltip(ElementReference elementReference) => tooltipService.Open(elementReference, "Some content", new TooltipOptions() { Position = TooltipPosition.Top }); ``` 3. Run the program and hover over the icon with your mouse. 4. No Tooltip is shown. If however I place the < RadzenTooltip /> tag inside the page that is rendered the tooltip does show. Expected behavior Tooltip should show on hover over the component. - OS: Windows 11 - Browser FireFox - Version v4.7.1
Author
Owner

@enchev commented on GitHub (Feb 19, 2023):

You can check our demos and Getting Started for reference.

@enchev commented on GitHub (Feb 19, 2023): You can check our demos and Getting Started for reference.
Author
Owner

@PaulSinnema commented on GitHub (Feb 19, 2023):

@enchev : I found the solution in the meantime. I should have reported back here, sorry. It should be in the Mainlayout.razor and it works perfectly.

@PaulSinnema commented on GitHub (Feb 19, 2023): @enchev : I found the solution in the meantime. I should have reported back here, sorry. It should be in the Mainlayout.razor and it works perfectly.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#739