onmouseenter incompatability with .NET 7.0 #626

Closed
opened 2026-01-29 17:40:28 +00:00 by claunia · 0 comments
Owner

Originally created by @MPapst on GitHub (Nov 8, 2022).

Describe the bug
I just upgraded my project to .NET 7.0 having a component for a generic value display that allows having a Tooltip on a html element.
Directly after the upgrade I got the following error:
image
for this code:

<div class="valuedisplay">
  <RadzenLabel Text="@Title" />
  @if (ChildContent != null)
  {
    <div @ref="SpanElement" @onmouseenter="@(_ => ShowToolTip(SpanElement!.Value))">
      @ChildContent
    </div>
  }
  else if (EmptyText != null && string.IsNullOrEmpty(Text))
  {
    <RadzenText TagName="TagName.P" Text="@EmptyText" />
  }
  else
  {
    <RadzenText TagName="TagName.P" Text="@Text" MouseEnter="@ShowToolTip" />
  }
</div>

To Reproduce
see description above.

Expected behavior

Screenshots

Desktop (please complete the following information):

  • OS: Win 11, VS2022
  • Browser -
  • Version -
Originally created by @MPapst on GitHub (Nov 8, 2022). **Describe the bug** I just upgraded my project to .NET 7.0 having a component for a generic value display that allows having a Tooltip on a html element. Directly after the upgrade I got the following error: ![image](https://user-images.githubusercontent.com/16494676/200665957-e5a37669-f2ab-4d6a-8189-f157e8f33be0.png) for this code: ```razor <div class="valuedisplay"> <RadzenLabel Text="@Title" /> @if (ChildContent != null) { <div @ref="SpanElement" @onmouseenter="@(_ => ShowToolTip(SpanElement!.Value))"> @ChildContent </div> } else if (EmptyText != null && string.IsNullOrEmpty(Text)) { <RadzenText TagName="TagName.P" Text="@EmptyText" /> } else { <RadzenText TagName="TagName.P" Text="@Text" MouseEnter="@ShowToolTip" /> } </div> ``` **To Reproduce** see description above. **Expected behavior** - **Screenshots** - **Desktop (please complete the following information):** - OS: Win 11, VS2022 - Browser - - Version -
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#626