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

Bug 285988

Summary: [Combo] Several behaviour differences between RAP and RCP
Product: [RT] RAP Reporter: Benjamin Wolff <eclipse>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.2   
Target Milestone: 1.3 M2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Combo Test RAP Example
none
Combo Test RCP Example
none
Proposed patch none

Description Benjamin Wolff CLA 2009-08-07 08:16:10 EDT
Created attachment 143766 [details]
Combo Test RAP Example

Build ID: CVS HEAD 07.08.09

Steps To Reproduce:
I noticed several behaviour differences between a ComboViewer in RCP and RAP. i provided two example bundles, one using RCP 3.5 and one using RAP and the CVS HEAD bundles. The source-code of the example views are identical.
the example view is a simple ComboViewer and below there is a button which prints the current selection of the ComboViewer to stdout.

1. in RCP the Combo selection box can be opened by focusing the Combo and pressing space, this does not work in RAP (both Combos created with the SWT.READ_ONLY flag)

2. using the SWT.READ_ONLY flag, in RCP there is no blinking cursor inside the Combo, in RAP there is.

3. when opening the combo selection box and navigate through the items using the cursor-keys, in RAP, the selection is immediately displayed in the combo widget, but when clicking somewhere else in the shell the Combo widget is updated but the underlying selection did not change, so the actual selection and the displaying text are not in sync. this can validated by doing the steps described above and use the button below the combo in the test examples to verify the current selection which is printed to stdout.
In RCP the selection is correctly displayed and updated only when the new item is selected. clicking somewhere else in the shell and thus closing the selection box without picking a particular selection won't create an inconsistent selection.

4. in RAP, when opening the selection box of the Combo and navigate through the items with the cursor-keys and then don't validate the selection by pushing enter or click on it, but instead push TAB, the selection box closes, the new selected is displayed in the combo widget, but again the underlying selection did not change. in RCP it is not possible to leave the selection box of a combo by pushing TAB.


These are just a few things i noticed. I hope these issues are reproducible, please ask if something is unclear.

Greetings,

-Ben

More information:
Comment 1 Benjamin Wolff CLA 2009-08-07 08:16:55 EDT
Created attachment 143767 [details]
Combo Test RCP Example
Comment 2 Ivan Furnadjiev CLA 2009-08-13 04:19:37 EDT
Hi Ben, I did some tests with RAP CVS HEAD and SWT Controls Example/SWT 3.5.0 (Windows Vista). Here are the resuts:
1. I can't open the selection list pressing space in RCP.
2. Yes I observe the same in FF 3.5.2 in IE6.
3. In RCP navigating with arrow-keys in the selection list update the selection and send the selection event immediately. In RAP the underlying selection is not changed and selection event is not fired.
4. In RCP the TAB key closes the selection list. But you are right - in RAP the underlying selection is not changed and selection event is not fired.
Comment 3 Benjamin Wolff CLA 2009-08-13 05:55:12 EDT
Hi Ivan,


(In reply to comment #2)
> Hi Ben, I did some tests with RAP CVS HEAD and SWT Controls Example/SWT 3.5.0
> (Windows Vista). Here are the resuts:
> 1. I can't open the selection list pressing space in RCP.

I forgot to mention that i was testing this under Ubuntu (GTK). This may differ under Windows environment. Will check this again under Windows XP and IE...

> 2. Yes I observe the same in FF 3.5.2 in IE6.
> 3. In RCP navigating with arrow-keys in the selection list update the selection
> and send the selection event immediately. In RAP the underlying selection is
> not changed and selection event is not fired.

After playing around with SelectionChangedListener in RAP and RCP (GTK) i could not relly reproduce this. Bringing up the Combo-Selection-List by clicking on the Combo and then navigate through the entries with the arrow-keys does not fire an event, neither in RCP nor in RAP, that is the way it should be. the selection becomes active when clicking on it, hitting enter or space. But as i mentioned before. However navigating in the Combo with the arrow-keys (without expanding the selection list, but just focus the Combo and hit the arrow-keys) both widgets behave identically in the way that they immediately fire the selection changed event, also correct. The problem is, when browsing through the combo-selection-list with the arrow-keys, the RAP Combo widget immediately updates the content of the Combo Text-Line without acutally changing the underlying selection, which is ok, because it is not desired to fire an selection event for every entry that is traversed in the selection-list. but after clicking somewhere else in the shell the aforementioned displayed-item/selected-item discrepancy occurs. can you confirm this?

> 4. In RCP the TAB key closes the selection list. But you are right - in RAP the
> underlying selection is not changed and selection event is not fired.
> 

Moreover, when hitting the escape-key with an expanded selection-list, in RCP (GTK) when selection process of the combo is aborted, which means no event if fired nor is the combo text-field updated. In RAP however, it seems that, when hitting the escape key, the combo widget selects the item that is currently highlighted in the drop-down selection list.


I will check this again with windows and IE.
These are not really critical issues though, but often experienced user only use the keyboard to fill out forms etc., in this case the different behaviour may cause some unexpected behaviour :).

Thx for helping me investigating these issues!


Greetings,

-ben

Comment 4 Ivan Furnadjiev CLA 2009-08-13 06:15:34 EDT
Ben,
> The problem is, when browsing through the combo-selection-list with the arrow-keys, the RAP Combo widget immediately
> updates the content of the Combo Text-Line without acutally changing the underlying selection, which is ok, because it is not
> desired to fire an selection event for every entry that is traversed in the selection-list. but after clicking somewhere else in the
> shell the aforementioned displayed-item/selected-item discrepancy occurs. can you confirm this?
on Windows navigating with arrow-keys in the combo-selection-list fires selection event for every entry that is traversed. There is no difference in the Combo behaviour if the combo-selection-list is shown or not and arrow-keys are used for navigation (selection change).
But ofcourse we have to agree which is the proper behaviour in this case - Windows or GTK :-)
Comment 5 Benjamin Wolff CLA 2009-08-13 18:13:15 EDT
Hi Ivan,


i could reproduce the behaviour you described under windows. assuming windows is the 'correct' behaviour ;) let's sum up the remaining issues:

- in contrast to RCP, in RAP there is still a blinking cursor visible when using SWT.READ_ONLY flag

- navigating through the expanded drop-down selection-list with arrow-keys does not fire selection events in RAP

- in contrast to RCP, in RAP hitting the escape key while the drop-down list is expanded selects the currently highlighted selection in the list

- in RAP, when focusing the combo widget for the first time, navigating with the arrow-keys does not work. can be reproduced in this way:
  - start the attached RAP example project
  - focus the combo without expanding the drop-down list (with tab for example)
  - try to navigate with the arrow-keys, in RCP this works

i hope i didn't forget anything :P. but that should suffice for the moment :).


greetings,

-ben


(In reply to comment #4)
> Ben,
> > The problem is, when browsing through the combo-selection-list with the arrow-keys, the RAP Combo widget immediately
> > updates the content of the Combo Text-Line without acutally changing the underlying selection, which is ok, because it is not
> > desired to fire an selection event for every entry that is traversed in the selection-list. but after clicking somewhere else in the
> > shell the aforementioned displayed-item/selected-item discrepancy occurs. can you confirm this?
> on Windows navigating with arrow-keys in the combo-selection-list fires
> selection event for every entry that is traversed. There is no difference in
> the Combo behaviour if the combo-selection-list is shown or not and arrow-keys
> are used for navigation (selection change).
> But ofcourse we have to agree which is the proper behaviour in this case -
> Windows or GTK :-)
> 

Comment 6 Ivan Furnadjiev CLA 2009-08-14 03:10:18 EDT
Thanks Ben, I confirm all remarked issues in comment #5.
Comment 7 Jordan Yakovchev CLA 2009-08-25 07:48:58 EDT
Created attachment 145530 [details]
Proposed patch

The issue with the blinking cursor is not fixed by this patch, because it is related to qooxdoo text field and currently there is no a solution.
The other three issues from comment #5 are fixed.
Comment 8 RĂ¼diger Herrmann CLA 2009-09-09 10:35:31 EDT
Applied patch to CVS HEAD