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

Selection clipboard returns text which is not currently selected, on XToolkit

XMLWordPrintable

    • x86
    • linux_sun

      Platform: Linux RH 9/ JDS / Solaris9 with XToolkit
      Build: Any tiger build (Tiger - b63)

      I am selecting the text in the text area. I am getting selection clipboard from toolkit class and getting the text from the clipboard. I am getting the selected text properly. I am de-selecting the text in the textarea and getting the selection clipboard again. I am surprised to see the same text being returned by the clipboard. The selection clipboard contents must be cleared as soon as the selected text is de-selected.

      This is seen only on XToolkit. On Motif, calling it after deselecting the text returns an empty string. This is reproducible on Solaris9 (XTKT) and Linux with tiger-b63, beta2 as well.

      I have attached a sample test. Execute the sample test. You would see a frame with a button and a textarea. Select the text in the text area and click the button. You will see the selected text on the console. De-select the text and click the button again. If you see the same text against 'Selected Text:', the bug is reproduced.

            dcherepanov Dmitry Cherepanov
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: