desktop icon indicating copy to clipboard operation
desktop copied to clipboard

[Bug]: Cannot copy/paste

Open HaNguyenThu opened this issue 10 months ago • 9 comments

Checks before filing an issue

  • [x] This issue doesn't reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
  • [x] I have checked the issue tracker and have not found an issue that matches the one I'm filing. This should include closed issues.
  • [x] This issue is not a troubleshooting question. Troubleshooting questions go here: https://forum.mattermost.com/c/trouble-shoot/16.
  • [x] This issue is not a feature request. You can request features and make product suggestions here: https://mattermost.com/suggestions/.
  • [x] This issue reproduces on the most recent stable version, or the most recent prerelease version of the Mattermost Desktop App.
  • [x] I have read the contribution guidelines.

Mattermost Desktop Version

5.11.2

Operating System

OS Name: Microsoft Windows 11 Pro

Mattermost Server Version

Mattermost Version: 9.11.0 | Database Schema Version: 124 | Build Number: 10163357270 | Database: mysql

Steps to reproduce

Cannot copy/paste texts from any channels of Mattermost Desktop App.

  • The bug does not happen in Mattermost opened in Web Browser.
  • The bug only happens when using keyboard (Ctrl+C/Ctrl+V). It does not happen with using mouse right-click.
  • The bug only happens if I copy/paste a link or a message which contains a link/hyperlink. The bug does not happen if I copy a text only.

Expected behavior

Any text (contain or not contain link) can be copied/pasted normally by (Ctrl+C/Ctrl+V).

Observed behavior

Any text contain link cannot be copied/pasted by (Ctrl+C/Ctrl+V).

Log Output

[2025-02-06 08:42:42.498] [info]  [App.Config] config.autostart has been configured: true
[2025-02-06 08:56:55.104] [info]  [UpdateManager] Checking for update
[2025-02-06 08:56:55.993] [info]  [UpdateManager] Update for version 5.10.2 is not available (latest version: 5.10.2, downgrade is disallowed).
[2025-02-06 09:16:05.661] [error] [WebContentsEventM...] [renderer] Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Bid%2C%20name%2C%20self%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
[2025-02-06 09:24:03.402] [error] Logger Log level set to: info
[2025-02-06 09:24:03.521] [warn]  [App.Initialize] Current working directory is C:\Windows\system32, changing into C:\Users\ha.nguyenthu\AppData\Local\Programs\mattermost-desktop
[2025-02-06 09:24:03.574] [info]  [App.Config] config.autostart has been configured: true
[2025-02-06 09:24:03.652] [info]  [App.Config] config.autostart has been configured: true
[2025-02-06 09:24:04.034] [info]  [ServerDropdownView] init
[2025-02-06 09:24:04.073] [warn]  [i18nManager] Failed to set new language en-US
[2025-02-06 09:24:04.073] [warn]  [i18nManager] Failed to set new language US
[2025-02-06 09:24:04.089] [info]  [App.Config] config.autostart has been configured: true
[2025-02-06 09:24:04.199] [info]  [App.Config] config.autostart has been configured: true
[2025-02-06 09:24:05.538] [info]  [App.Config] config.autostart has been configured: true

Additional Information

No response

HaNguyenThu avatar Mar 20 '25 09:03 HaNguyenThu

Have you tried this in a browser? Also are you using insecure HTTP over HTTPS? I also see a minified react error in the log, is the app running properly?

If all this is true can you take a video for me?

devinbinnie avatar Mar 26 '25 13:03 devinbinnie

I can copy the regular text, but getting the same problems when trying to copy urls from messages. In on a windows 11 as well. I managed to understand the problem: if you move your mouse around, the selected text might change from blue to gray (dark theme), when the selection is of gray color, it won't be copied. If selection is of blue color, it will copy. I guess, it is losing focus somehow on mouse movement (not clicking anything)

UPD: it is losing focus when i hovering the urls

Melodeiro avatar May 15 '25 01:05 Melodeiro

@devinbinnie Hello,

  • As I wrote in the "Steps to reproduce", the bug only happens in Mattermost Desktop App, it does not happen in Mattermost opened in Web Browser.
  • Indeed I use HTTPS (here is our organization link: https://chat.gameloft.org/)
  • The app is running fine, I do not have any another problem apart from the "cannot copy/paste" issue mentioned above.

@Melodeiro Many thanks for your additional information 👍

HaNguyenThu avatar May 15 '25 01:05 HaNguyenThu

@HaNguyenThu Can you reproduce the same issue on the community server? https://community.mattermost.com

devinbinnie avatar May 15 '25 17:05 devinbinnie

@devinbinnie I do reproduce the same issue on the community server, at least on a link with integration.

Gouvernathor avatar Jun 02 '25 13:06 Gouvernathor

@devinbinnie I do reproduce the same issue on the community server, at least on a link with integration.

@Gouvernathor Can you produce a video of what you're seeing?

devinbinnie avatar Jun 02 '25 13:06 devinbinnie

The bug is not merely copy/paste, it's more widely the loss of focus on the text input box when hovering a link. I can't produce a video.

  1. Go to a channel in which one of the last messages contains a link, preferably one with integration (I'll let you test whether that changes anything), and in which you're allowed to send messages
  2. click on / focus the text box at the bottom
  3. start typing gibberish with your keyboard
  4. while typing gibberish, move your mouse over the integration and/or the link itself
  5. despite continually typing on your keyboard, the text input box lost focus and the text inside stopped being written to, the instant your mouse hovered the link or its integration.

The copy/paste stuff is a bit harder to explain in simple steps like that, but I'm convinced it's the same bug. Basically it's as Melodeiro said : try selecting a part of a message (highlighting that part in blue), the moment your mouse hovers a link in the message, the selection turns grey and when releasing the mouse, Ctrl+C doesn't do anything. Right-clicking puts the focus back on the selected text, so the Copy option in the contextual menu still works.

Gouvernathor avatar Jun 02 '25 13:06 Gouvernathor

Yes, the source of the problem is a loss of focused state when hovering over any links in MM. And the most annoying part is that you can't copy the selected text after that because it's no longer focused.

Melodeiro avatar Jun 02 '25 14:06 Melodeiro

Image

In the latest update, the behavior is even stranger: it rapidly switches between focused and unfocused states when I move my mouse. Note that I only clicked the mouse button at the beginning and end of the video. From 0:01 to 0:07 all i did was move the cursor.

Melodeiro avatar Jun 02 '25 14:06 Melodeiro