diff --git a/src/ftxui/component/input.cpp b/src/ftxui/component/input.cpp
index c19b508d2903a0998761cd2dc1263580d00e9015..1f49d919e77980c0a9292c06f6f3727ad051a7ad 100644
--- a/src/ftxui/component/input.cpp
+++ b/src/ftxui/component/input.cpp
@@ -341,27 +341,19 @@ class InputBase : public ComponentBase {
   }
 
   bool HandleReturn() {
-    int& cursor_position = option_->cursor_position();
-    content_->insert(cursor_position, "\n");
-    cursor_position++;
-    option_->on_change();
+    if (option_->multiline()) {
+      HandleCharacter("\n");
+    }
+    option_->on_enter();
     return true;
   }
 
   bool HandleCharacter(const std::string& character) {
-    if (character == "\n" && !option_->multiline()) {
-      option_->on_enter();
-      return false;
-    }
-
     int& cursor_position = option_->cursor_position();
     content_->insert(cursor_position, character);
     cursor_position += character.size();
     option_->on_change();
 
-    if (character == "\n") {
-      option_->on_enter();
-    }
     return true;
   }
 
@@ -369,6 +361,9 @@ class InputBase : public ComponentBase {
     int& cursor_position = option_->cursor_position();
     cursor_position = util::clamp(cursor_position, 0, (int)content_->size());
 
+    if (event == Event::Return) {
+      return HandleReturn();
+    }
     if (event.is_character()) {
       return HandleCharacter(event.character());
     }
@@ -405,9 +400,6 @@ class InputBase : public ComponentBase {
     if (event == Event::ArrowRightCtrl) {
       return HandleRightCtrl();
     }
-    if (event == Event::Return) {
-      return HandleReturn();
-    }
 
     return false;
   }
diff --git a/src/ftxui/component/input_test.cpp b/src/ftxui/component/input_test.cpp
index 057c3bd4101459b1d24b49fab2968cdaa27448de..16440590f3d14b1f958a52f1ca8cd28985595f35 100644
--- a/src/ftxui/component/input_test.cpp
+++ b/src/ftxui/component/input_test.cpp
@@ -722,6 +722,18 @@ TEST(InputTest, MouseClickComplex) {
   EXPECT_EQ(option.cursor_position(), 17);
 }
 
+TEST(InputTest, OnEnter) {
+  std::string content;
+  auto option = InputOption();
+  bool on_enter_called = false;
+  option.on_enter = [&] { on_enter_called = true; };
+  Component input = Input(&content, &option);
+
+  EXPECT_FALSE(on_enter_called);
+  EXPECT_TRUE(input->OnEvent(Event::Return));
+  EXPECT_TRUE(on_enter_called);
+}
+
 }  // namespace ftxui
 
 // Copyright 2023 Arthur Sonzogni. All rights reserved.