flutter / flutter-intellij

Flutter Plugin for IntelliJ
https://flutter.dev/using-ide
BSD 3-Clause "New" or "Revised" License
1.98k stars 319 forks source link

Copying text from an embedded DevTools view does not work #7667

Open kenzieschmoll opened 1 month ago

kenzieschmoll commented 1 month ago

Repro steps:

  1. Open Flutter DevTools or Flutter DevTools Extensions tool window
  2. Open the settings dialog (gear icon in bottom right of the DevTools view)
  3. Click the "Copy logs" button.

Expected result: logs are copied to clipboard. Actual result: an exception is thrown.

copy is not successful NotAllowedError: Failed to execute 'writeText' on 'Clipboard': Write permission denied.

Copy failed. This may be as a result of a known bug in VS Code. See https://github.com/Dart-Code/Dart-Code/issues/4540 for more information. Now attempting to use a fallback method of copying the that is a workaround for VS Code only.

When text is manually selected using the mouse and copied using cmd+c, the copy is successful. An easy way to test this is to open the About DevTools menu (question mark icon in the bottom right of the DevTools view) and try to copy the version text.

@helin24