fixed bug launching double events on Canc(Delete) keypress because of a missing break in the case

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/widgets/pickitem-widget@117253 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2015-07-15 10:33:13 +00:00
parent 907f72de81
commit 1b4ea6b9fd
1 changed files with 8 additions and 7 deletions

View File

@ -50,6 +50,11 @@ public class PickItemsDialog extends PopupPanel {
private int limit = 10;
private int itemCursorIndexEnd;
private int itemCursorIndexStart = -1;
boolean handleNonCharKeys = false;
private final MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
private int displayIndexSelected;
@ -142,11 +147,6 @@ public class PickItemsDialog extends PopupPanel {
select(0); //RESET
}
private int itemCursorIndexEnd;
private int itemCursorIndexStart = -1;
boolean handleNonCharKeys = false;
/**
* called for each onKeyPress event from the user
* @param keyCode the event keycode
@ -173,10 +173,10 @@ public class PickItemsDialog extends PopupPanel {
hide();
handleNonCharKeys = false;
}
}
}
/**
* called for each onKeyUp event from the user
* @param keyCode the event keycode
@ -219,6 +219,7 @@ public class PickItemsDialog extends PopupPanel {
case ESCAPE:
case DELETE:
hide();
break;
case ENTER: //selectd with keyboard
SelectableItem ut = null;
if (mainPanel.getWidgetCount() > 0) {