Open mathsaey opened 2 weeks ago
I don't believe Firefox is responsible for deciding to copy when Ctrl is pressed. I think that's up to Sway.
I don't believe Firefox is responsible for deciding to copy when Ctrl is pressed. I think that's up to Sway.
See https://wayland.app/protocols/wayland#wl_data_device_manager:enum:dnd_action
I originally thought this was a firefox issue, since the dnd was from firefox to firefox. You are right however; if I open Thunar and try to copy a file by dragging it to another thunar window while holding ctrl, it just moves the file instead.
I'll edit the title and add some more context to my original post. However, I'm not sure if this can still be considered a bug at this point, or if this boils down to a feature request?
Note I originally thought this was a firefox-specific issue, but it turns out to be more general. Thanks to @emersion for pointing this out.
Original Issue
Steps to reproduce
Expected behavior: Holding ctrl should set the dropEffect to "copy", causing a copy of the element to be created in the drop zone.
Actual behavior: The element is moved to the drop zone. This is the case as the dropEffect element is set to "move", because firefox did not receive (or correctly handle) the ctrl keypress.
I initially thought this was a firefox bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1904265). However, everything works as intended when running firefox inside mutter (on wayland). Thus, I am reporting it here.
In the debug log, I opened firefox (
MOX_ENABLE_WAYLAND=1 firefox-bin --profile ~/.mozilla/firefox/0doofw58.cleanProfile 'https://jsfiddle.net/1z3k58pc/'
) and tried to do the drag and drop action three times. The first time, I did not hold ctrl while dragging, the other two times, I did hold ctrl; I reset the page using the "run" button on jsfiddle between each attempt.Updated Issue
Sway does not modify the drag and drop action when the ctrl key is held. According to the spec, holding ctrl may change the drag and drop action to "copy", however, this is not the case in sway.
To reproduce:
The item is moved to the new location, not copied.