| Summary: | [Combo] Read only combo takes focus away from another widget | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Yury <swimmer_86> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jens.borrmann |
| Version: | 2.3 | ||
| Target Milestone: | 3.0 M7 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Confirmed with RAP 3.0M6 too. Fix is pending. Pending change - https://git.eclipse.org/r/#/c/45913/ Ivan, can this fix be easily ported to RAP 2.3? yes... I think so... look at the change - two lines of code. Just checked this fix and it is not pretty good, because you cannot continue typing after changing item of the combo - focus lost from the text field. Yury, the fix is good. Tested with your snippet from description and RAP from master (3.0M6+) in Chrome, Firefox and IE. The foucus stays on text field and you can continue typing. Probably something else is changed in RAP 3.0 that make it work. That's why I'm asking about porting the fix to RAP 2.3 - unfortunately, simply repeating these changes does not work. Unfortunately, I have no idea what other change may interfere. Change https://git.eclipse.org/r/#/c/45913/ is merged. *** Bug 473751 has been marked as a duplicate of this bug. *** Yury, just applied the change in 2.3-maitenance branch (cherry pick the commit) and it works as expected. |
Snippet: final Combo combo = new Combo(composite, SWT.BORDER | SWT.READ_ONLY); combo.add("Item1"); combo.add("Item2"); combo.select(0); final Text text = new Text(composite, SWT.BORDER); text.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent event) { combo.setItem(0, text.getText()); } }); When we are typing in text field the focus is moved from it to the combo. Focus is not lost in RCP.