Bug 489010 - Copying error messages from Dolphin with Ctrl+C will copy selected files instead of text
Summary: Copying error messages from Dolphin with Ctrl+C will copy selected files inst...
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 24.05.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-22 21:08 UTC by Eamonn Rea
Modified: 2024-06-23 01:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eamonn Rea 2024-06-22 21:08:58 UTC
SUMMARY
If Dolphin displays an error, such as "WorkingDirectory= may not be below /proc/, /sys/ or /dev/", it will not copy the text but instead will copy nothing, or the selected file.

I noticed this when reporting Bug 489008 when I tried to copy the error message shown there, and couldn't paste it into the issue title. I checked my clipboard contents and saw that the selected file was being copied. This problem may apply generally to any time Dolphin shows these kinds of bubbles.

Right-clicking on this text after selecting it will show the "Copy" option, which works, but there is no "Ctrl+C" shortcut description beside it, so perhaps this is intentional or a missing feature. Clicking on this message box will correctly "unfocus" the selected item in the files pane, dimming the accent colour, so I imagine the pane is losing focus. Perhaps these bubbles just need to be wired up to enable Ctrl+C?

If it is not intended for this message to work with Ctrl+C, then the text should not be selectable, and pressing Ctrl+C should still probably not copy the files as the selection colour is dimmed implying it is not focused. But it would be nice if these errors could be copied, in case a user needs to talk about them online or anything :-)

STEPS TO REPRODUCE
1. Trigger Dolphin to display an in-window warning, such as by trying to open a file in /dev on Plasma 6.1.0.
2. Select the text in this warning and attempt to copy it with Ctrl+C
3. The text will not be copied, you have to right click on the selection and choose "Copy"

OBSERVED RESULT
Messages in warning/error sections in Dolphin cannot be copied with Ctrl+C, and it will instead copy any selected files instead of the error contents.

EXPECTED RESULT
Messages should be able to be copied with Ctrl+C because they can be copied by right clicking and choosing "Copy". If it is intentional that these messages cannot be copied with Ctrl+C, then at least, nothing should be copied including any selected files, as the pane with the selection is dimmed visually implying that the selection is not focused and so won't be copied.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.9.5 Linux Zen
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION
I have only tested with one warning message, that is the one from Bug 489008, but I can test others if you can direct me on how to trigger some of them.
Comment 1 Eamonn Rea 2024-06-23 01:19:22 UTC
I found out this applies outside of Dolphin. In Kate if you open a file and it updates while the file is open, it prompts you to ask if you want to reload the file, enable auto-reload, etc. This bubble is very similar to the one in Dolphin, and if you select the text in this prompt, the same  thing happens; selected text will be copied (there is no selected text focus colour changes in Kate even if the window is unfocused so that doesn't apply here) and the text from the prompt will not be copied. Similarly right-clicking on it will allow you to copy it but it won't show "Ctrl+C" in the context menu. 

Maybe this is a problem generally related to this UI component, if it's re-used?