Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 464757

Summary: [Combo] Read only combo takes focus away from another widget
Product: [RT] RAP Reporter: Yury <swimmer_86>
Component: RWTAssignee: 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:

Description Yury CLA 2015-04-16 02:35:41 EDT
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.
Comment 1 Ivan Furnadjiev CLA 2015-04-16 03:34:58 EDT
Confirmed with RAP 3.0M6 too. Fix is pending.
Comment 2 Ivan Furnadjiev CLA 2015-04-16 04:54:25 EDT
Pending change - https://git.eclipse.org/r/#/c/45913/
Comment 3 Yury CLA 2015-04-16 05:03:33 EDT
Ivan, can this fix be easily ported to RAP 2.3?
Comment 4 Ivan Furnadjiev CLA 2015-04-16 05:38:57 EDT
yes... I think so... look at the change - two lines of code.
Comment 5 Yury CLA 2015-04-16 06:01:14 EDT
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.
Comment 6 Ivan Furnadjiev CLA 2015-04-16 06:31:46 EDT
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.
Comment 7 Yury CLA 2015-04-16 06:37:01 EDT
That's why I'm asking about porting the fix to RAP 2.3 - unfortunately, simply repeating these changes does not work.
Comment 8 Ivan Furnadjiev CLA 2015-04-16 06:46:31 EDT
Unfortunately, I have no idea what other change may interfere.
Comment 9 Ivan Furnadjiev CLA 2015-04-20 08:36:28 EDT
Change https://git.eclipse.org/r/#/c/45913/ is merged.
Comment 10 Ivan Furnadjiev CLA 2015-07-29 03:54:07 EDT
*** Bug 473751 has been marked as a duplicate of this bug. ***
Comment 11 Ivan Furnadjiev CLA 2015-07-30 05:41:06 EDT
Yury, just applied the change in 2.3-maitenance branch (cherry pick the commit) and it works as expected.