diff --git a/src/main/java/edu/kit/typicalc/view/main/InputBar.java b/src/main/java/edu/kit/typicalc/view/main/InputBar.java index 17e1aa0..76ba915 100644 --- a/src/main/java/edu/kit/typicalc/view/main/InputBar.java +++ b/src/main/java/edu/kit/typicalc/view/main/InputBar.java @@ -108,8 +108,13 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver { private void onTypeInferButtonClick(Consumer>> callback) { String currentInput = inputField.getOptionalValue().orElse(StringUtils.EMPTY); + inputField.blur(); - UI.getCurrent().getPage().setTitle(getTranslation("root.typicalc") + " - " + currentInput); + if ("".equals(currentInput)) { + UI.getCurrent().getPage().setTitle(getTranslation("root.typicalc")); + } else { + UI.getCurrent().getPage().setTitle(getTranslation("root.typicalc") + " - " + currentInput); + } callback.accept(Pair.of(currentInput, typeAssumptionsArea.getTypeAssumptions())); }