fluentui-blazor icon indicating copy to clipboard operation
fluentui-blazor copied to clipboard

fix: firefox word-wrap in FluentTooltip

Open MxNbrt opened this issue 2 years ago • 2 comments

🐛 Bug Report

When using the FluentTooltip with a long text, the text does not wrap in firefox.

💻 Repro or Code Sample

@page "/"
@rendermode InteractiveServer
@using Microsoft.FluentUI.AspNetCore.Components

<div style="display: flex">
    <FluentInputLabel Label="my custom label" Required />
    <FluentIcon Id="infoIcon" Value="@(new Icons.Regular.Size16.Info())" Style="margin-left: 5px; margin-bottom: 4px;" />
    <FluentTooltip Anchor="infoIcon" Position="TooltipPosition.Right">
        Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
    </FluentTooltip>
</div>

🤔 Expected Behavior

In Chrome, the tooltip wraps at 500px: image

😯 Current Behavior

In Firefox, it does not wrap: image

💁 Possible Solution

I can't tell what the real problem here is. Maybe you can ;)

🔦 Context

The issue is that firefox does not recognize "text-wrap: wrap;" as a valid value even though this is an allowed value in the docs https://developer.mozilla.org/en-US/docs/Web/CSS/text-wrap

image

🌍 Your Environment

  • OS & Device: Windows on PC
  • Browser: Mozilla FireFox, latest version
  • .NET 8 with fluentui-blazor 4.4.1

MxNbrt avatar Feb 26 '24 11:02 MxNbrt

Found a similar issue with the Data Grid in the Project Templates provided with the project. For a long text cell it no longer shortens with an ellipsis (...), it displays each rows columns as individual rows.

image

Fix was, created a new Blazor server app and manually set up FluentUI for the project and everything worked as expected.

todarko avatar Feb 26 '24 18:02 todarko

For the Tooltip, it works with the latest Firefox Developer Edition (124b4): image

@todarko please create a new issue with minimal working reproduction code. We can't debug/troubleshoot based of an image...

vnbaaij avatar Feb 26 '24 21:02 vnbaaij