Fix textBuffer keeping buffered text and bleeding it into the next input (#344)

This commit is contained in:
Algent authored and GitHub committed 2026-06-10 22:01:57 +01:00
1 parent 084284f094
commit 6807c98ea9
1 file changed
+2
@@ -47,6 +47,7 @@ public final class TextFieldHandler {
Lwjgl3ify.LOG.info("[DEBUG] Stopping text input");
}
MainThreadExec.runOnMainThread(() -> { SDL_StopTextInput(Display.getWindow()); });
textBuffer.setLength(0);
}
if (textField != null && textField == focusedTextInput.get()) {
focusedTextInput = NULL_TEXT_FIELD;
@@ -62,6 +63,7 @@ public final class TextFieldHandler {
textInputDepth = 0;
}
focusedTextInput = NULL_TEXT_FIELD;
textBuffer.setLength(0);
}
public static void setFocusedTextField(GuiTextField textField) {