Skip to content

bug(Clipboard): Copy to clipboard doesn't work in elem.requestFullscreen() #27447

Closed
@pstyrna

Description

@pstyrna

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 using document.element.requestFullscreen(), coping to clipboard through angular/cdk/clipboard doesn't work. It works fine using navigator.clipboard.writeText().

Reproduction

StackBlitz link: https://stackblitz.com/edit/zffwu2?file=src%2Fexample%2Fcdk-clipboard-overview-example.ts
Steps to reproduce:

  1. Enter fullscreen by clicking "Open fullscreen" button
  2. Click "Copy to clipboard button"

Expected Behavior

Text from text area to be copied to clipboard.

Actual Behavior

Nothing happens.

Environment

  • Angular: 16.1.1
  • CDK/Material: 16.1.4
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/clipboard

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions