Browse Source

fix focus problem

Laserlicht 2 years ago
parent
commit
f6843c0574
1 changed files with 7 additions and 4 deletions
  1. 7 4
      client/widgets/TextControls.cpp

+ 7 - 4
client/widgets/TextControls.cpp

@@ -809,9 +809,12 @@ void CFocusable::moveFocus()
 
 void CFocusable::removeFocus()
 {
-	focus = false;
-	focusListener->focusLost();
-	redraw();
+	if(this == inputWithFocus)
+	{
+		focus = false;
+		focusListener->focusLost();
+		redraw();
 
-	inputWithFocus = nullptr;
+		inputWithFocus = nullptr;
+	}
 }