diff --git a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java index 333c3c8..b726960 100644 --- a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java +++ b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionField.java @@ -62,6 +62,13 @@ public class TypeAssumptionField extends HorizontalLayout implements LocaleChang setId(ASSUMPTIONS_FIELD_ID); } + /** + * Focus the variable field of this element. + */ + protected void focus() { + variableInputField.focus(); + } + /** * Gets the variable of the type assumption. * diff --git a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java index 565250b..3c28a63 100644 --- a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java +++ b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java @@ -94,6 +94,7 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver }); assumptionContainer.add(assumption); fields.add(assumption); + assumption.focus(); } private void onDeleteAllClick() {