Bug 562271 - Windows: Pasting Non-Empty text onto SWT.MULTI-Text widget causes 2 events (first one with "")
Summary: Windows: Pasting Non-Empty text onto SWT.MULTI-Text widget causes 2 events (f...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.15   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-17 14:32 EDT by Ingo Mohr CLA
Modified: 2020-04-17 14:32 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Mohr CLA 2020-04-17 14:32:46 EDT
Hi folks! :)

This just took me 2h of debugging in our own client code base, and what I found in the end seems to be a bug in SWT.

Scenario
--------
* Have a Text widget with style: SWT.BORDER | SWT.MULTI
* Enter some text A
* Copy some other text B to clipboard
* Select A and hit Paste (CTRL + V)

Expected
--------
* 1 Event: Text widget has value B

Actual
------
* 2 Events:
** 1: Text widget has value ""
** 2: Text widget has value B

Main Problem (for us) this effect causes is performing UNDO:
* Undoing the change clears the value.
* You have to undo twice to get back to the old value.


Note:
For single line Text widgets - i.e. a Text with style SWT.BORDER (without SWT.MULTI), the scenario works as expected.

Thanks in advance for looking at it. :)

Cheers
Ingo