Browse Source

Force-show on-screen keyboard if player closed it before

Ivan Savenko 1 year ago
parent
commit
d374cec6fb
1 changed files with 3 additions and 2 deletions
  1. 3 2
      client/widgets/CTextInput.cpp

+ 3 - 2
client/widgets/CTextInput.cpp

@@ -124,8 +124,9 @@ std::string CTextInput::getVisibleText()
 
 void CTextInput::clickPressed(const Point & cursorPosition)
 {
-	if(!hasFocus())
-		giveFocus();
+	// attempt to give focus unconditionally, even if we already have it
+	// this forces on-screen keyboard to show up again, even if player have closed it before
+	giveFocus();
 }
 
 void CTextInput::keyPressed(EShortcut key)