Skip to content

Commit

Permalink
Support enter press in refactoring rename form (#8754)
Browse files Browse the repository at this point in the history
Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
  • Loading branch information
vzhukovs committed Feb 13, 2018
1 parent 7bb45b6 commit 3c996da
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import static com.google.gwt.dom.client.Style.Cursor.POINTER;

import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Timer;
Expand Down Expand Up @@ -150,6 +151,13 @@ public void showDialog() {
super.show(newName);
}

@Override
public void onEnterPress(NativeEvent evt) {
if (accept.isEnabled()) {
accept.click();
}
}

@Override
protected void onShow() {
newName.selectAll();
Expand Down

0 comments on commit 3c996da

Please sign in to comment.