瀏覽代碼

Text input: Don't move to cursor on mousedown, only while dragging

Michael Ragazzon 2 年之前
父節點
當前提交
c7bc2be60a
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Source/Core/Elements/WidgetTextInput.cpp

+ 2 - 1
Source/Core/Elements/WidgetTextInput.cpp

@@ -498,7 +498,8 @@ void WidgetTextInput::ProcessEvent(Event& event)
 			if (UpdateSelection(event == EventId::Drag || event.GetParameter<int>("shift_key", 0) > 0))
 				FormatText();
 
-			ShowCursor(true);
+			const bool move_to_cursor = (event == EventId::Drag);
+			ShowCursor(true, move_to_cursor);
 			cancel_next_drag = false;
 		}
 	}