Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
19.0.5
What operating system are you using?
macOS
Operating System Version
Mac OS Montrey 12.2.1 (Apple M1)
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
19.0.4
Expected Behavior
-
This feature should copy the target file.
-
With reference to the sample code:
console.timeEnd('drag2') // line 38 of main.js
This line should be called at the end of dragging.
Actual Behavior
-
This feature is moving the target file instead of copying. If you run the sample code in the attached Gist URL, you will find that you are unable to drag the same target more than once.
-
With reference to the same sample code as [2.] in Expected Behavior, above:
console.timeEnd('drag2') // line 38 of main.js
This line is being called at the start of dragging, instead of the end.
Testcase Gist URL
https://gist.github.com/34bc977bc272030760b586d53961e0f1
Additional Information
The sample code I provided in the Gist URL was created from the official Sample Code with an addition of console.time
and console.timeEnd
I have a feeling this bug was introduced when merging the following Pull Request:
#34615
Questions:
How can I do the following, like before (in 19.0.4 and earlier versions)
- Copy the target file on drag
- Act on the end of the user's dragging
Behavior on Windows:
In Windows 11, the behavior is as expected, and identical across all Electron versions, including 19.0.4 and 19.0.5.