Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8117209

Mac: DragEvent.getDragboard().getTransferModes() returns an empty set on Mac

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 7u6
    • javafx
    • None

    Description

      Pavel Safrata wrote:
      > This is a bug on Mac, most probably on Glass level. Please file one. The cause of all the issues is that dragEvent.getDragboard().getTransferModes() returns an empty set (modifying it on your side doesn't have any effect, in fact we should return an unmodifiable set here, this is an action item for me).
      > Thanks,
      > Pavel
      >
      > On 15.5.2012 15:41, shanliang wrote:
      >> Hi Pavel,
      >>
      >> I dragged a file from Mac.Finder, and the file permission was READABLE_WRITABLE.
      >> I tried to add TransferMode.COPY_OR_MOVE into dragEvent.getDragboard(), it did not throw an exception but the list was still empty.
      >>
      >> Shanliang
      >>
      >> Pavel Safrata wrote:
      >>> Hi Shanliang,
      >>> if dragEvent.getDragboard().getTransferModes() returns an empty set it tells you that the gesture source doesn't support any transfer modes. If you are dragging from an external application, then it is a bug on Mac (or in this external app). If you are dragging from your application and are passing something to startDragAndDrop, then it's bug on Mac as well. If you are dragging from your application and are not passing anything to startDragAndDrop, then it's bug on Windows as it shouldn't drop anywhere.
      >>> Pavel
      >>>
      >>> On 15.5.2012 15:11, shanliang wrote:
      >>>> Hi,
      >>>>
      >>>> I implemented EventHandler<DragEvent> for dragging a image file into SceneBuilder, it worked on Windows, but failed on Mac.
      >>>>
      >>>> I checked that I never received DragEvent.DRAG_DROPPED on Mac:
      >>>> I called:
      >>>> dragEvent.acceptTransferModes(TransferMode.COPY_OR_MOVE);
      >>>> when receiving DragEvent.DRAG_OVER, but calling:
      >>>> dragEvent.getAcceptedTransferMode()
      >>>> always returned null
      >>>>
      >>>> Then I checked
      >>>> dragEvent.getDragboard().getTransferModes()
      >>>> it returned always empty on Mac but returned a list with COPY_MOVE_LINK on Windows.
      >>>>
      >>>> Is this a bug on Mac?
      >>>>
      >>>> Thanks
      >>>>
      >>>> Shanliang
      >>>>
      >>>>

      Attachments

        Issue Links

          Activity

            People

              gziemski Gerard Ziemski
              sjiang Shanliang Jiang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: