8000 Default drag-and-drop cursor is the copy cursor · Issue #27594 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Default drag-and-drop cursor is the copy cursor #27594
Open
@emlys

Description

@emlys

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 an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    11.2.1
  • Operating System:
    macOS Catalina 10.15.6
  • Last Known Working Electron version:
    none

Expected Behavior

I expect that dragging a file over an electron app should not turn on the copy cursor by default.

Actual Behavior

When you drag a file over an electron app, the cursor gets the copy cursor icon while it is over the app window. The copy cursor is supposed to "indicate that dragging the item will create a copy of it at a new location." This is confusing, especially for an app which does have certain components that accept drag-and-drop and others that don't. You can prevent the copy cursor by adding an onDragOver handler to all non-drag-and-drop components, but that doesn't cover the edges of the <body> that are outside any component.

To Reproduce

  1. Create and launch the hello world app from the electron quick start guide.
  2. Drag a file across the app window.

Screenshots

Pressing command+shift+3 to take a screenshot makes the copy cursor icon disappear.

Additional Information

This does happen in Chrome, but it makes sense there because Chrome will open a file that you drag-and-drop onto it. If this behavior is inherited from Chrome, it should get overridden, because it doesn't make sense for most parts of most apps.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0