| Summary: | [Text] ModifyEvents not correctly firing on MULTI Texts in Safari | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Andrew Cho <andcho09> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | stefan.roeck |
| Version: | 1.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
I can't reproduce it with your snippet and CVS HEAD (Windows Vista + Safari 4.0.3 (531.9.1) ). Please reopen if the bug persist. |
On Safari 4.0.2, if you create a Text widget with the SWT.MULTI style and add a ModifyListener to it, the ModifyEvent is only fired when when focus is lost from the text field. Environment: Safari 4.0.2 on Windows XP or Windows Vista Steps to reproduce: * Create a Text widget with the SWT.MULTI style * Add a ModifyListener to the widget * Enter some text into the Text widget Expected: The ModifyEvent is fired whenever the text is modified Actual: The ModifyEvent is not fired and only fires when focus is lost from the text field The following is a code snippet that demonstrates the problem with a Text field without the SWT.MULTI style for comparison. final Text multiText = new Text(parent, SWT.MULTI | SWT.BORDER); final Text singleText = new Text(parent, SWT.SINGLE | SWT.BORDER); final ModifyListener listener = new ModifyListener() { @Override public void modifyText(final ModifyEvent event) { final Text text = (Text) event.getSource(); if (text == multiText) { System.out.println("Modified multi '" + text.getText() + "'"); } else { System.out.println("Modified single '" + text.getText() + "'"); } } }; multiText.addModifyListener(listener); singleText.addModifyListener(listener);