Upon selection in AddMemberBox, focus the box's text field

In the change screen, after clicking on an element of the 'Add
Reviewer' suggestion list, users expect to be able to add the reviewer
by hitting enter. This did not work in Firefox, as after clicking on
an entry in the suggestion list, the body got focused. By setting the
focus on the 'Add reviewer's text box after selecting a suggestion
list item, we now allow users to add the reviewer by hitting enter.

Change-Id: I50ab4f80107f606f97260d48fc770672b829ea38
This commit is contained in:
Christian Aistleitner
2013-03-04 09:49:34 +01:00
parent b120c9a70f
commit 882d3bc2cc

View File

@@ -72,6 +72,7 @@ public class AddMemberBox extends Composite {
nameTxt.addSelectionHandler(new SelectionHandler<Suggestion>() {
@Override
public void onSelection(SelectionEvent<Suggestion> event) {
nameTxtBox.setFocus(true);
if (submitOnSelection) {
submitOnSelection = false;
doAdd();