Skip to content

bug(COMPONENT): Mat-icon adds a line-break in table selection context #32289

@3phase

Description

@3phase

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When I have a mat-icon within a table cell, selecting the whole table and pasting it into Excel would add a line break after the mat-icon in Firefox.

Reproduction

StackBlitz link: https://stackblitz.com/edit/zelta2gg?file=src%2Fexample%2Ficon-overview-example.html
Steps to reproduce:

  1. Select the whole table and copy using Firefox
  2. Paste into Excel
  3. The second header cell goes on the next line
  4. The issue can't be reproduced in Chrome or if the mat-icon is removed

Expected Behavior

The cells are on the same line (the selection doesn't include a new line after the mat-icon)

Actual Behavior

In Firefox, the selection contains a line break after the mat-icon although nothing in the icon itself suggests a line break

Environment

  • Angular: 20.2
  • CDK/Material: 20.2
  • Browser(s): Firefox 144
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS Tahoe (reproduced on 17 as well)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/iconfirefoxThis issue is specific to the Firefox browser

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions