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

Unable to drag the selected text in the textarea on XToolkit (DND)

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86, sparc
    • OS:
      linux, solaris_2.5.1, solaris_9

      Description

      I have a textarea and I have implemented the Drag-N-Drop interfaces for the textarea. I want to select some text in the textarea and drag the selected text to the target component. On XToolkit, when i try to drag the selected text the selection vanishes. I am actually creating transferable out of textarea.getSelectedText() and in this case, the selected text becomes empty when I initiate the drag operation. This is noticed on Solaris and Linux, only with XToolkit. This works fine on Motif. Hence this is an incompatibility introduced in Tiger that prevents DND operations on a selected text.

      XToolkit behavior resembles Swing component's default behavior but in Swing, we can change that to 'motif' kind of behavior by calling setDragEnabled(true). But in AWT, there is no such API and hence the customer will not be able to do any DND operations on the selected text.

      I have attached a sample test. Execute the test. You will get 2 frames each having a textarea. Select the text in the textarea on the source frame and try dragging it. If the selection vanishes, the bug is reproduced.
      ###@###.### 10/14/04 17:35 GMT

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              denis Denis Fokin (Inactive)
              Reporter:
              pmohansunw Praveen Mohan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Imported:
                Indexed: