diff --git a/Source/Editor/Content/GUI/ContentView.cs b/Source/Editor/Content/GUI/ContentView.cs
index 105df76d4..fee36bbb0 100644
--- a/Source/Editor/Content/GUI/ContentView.cs
+++ b/Source/Editor/Content/GUI/ContentView.cs
@@ -646,7 +646,9 @@ namespace FlaxEditor.Content.GUI
_rubberBandRectangle = new Rectangle(_mousePressLocation, 0, 0);
_isRubberBandSpanning = true;
StartMouseCapture();
+ return true;
}
+
return AutoFocus && Focus(this);
}
diff --git a/Source/Editor/Windows/EditorWindow.cs b/Source/Editor/Windows/EditorWindow.cs
index 220fe0814..30bcd131a 100644
--- a/Source/Editor/Windows/EditorWindow.cs
+++ b/Source/Editor/Windows/EditorWindow.cs
@@ -14,8 +14,6 @@ namespace FlaxEditor.Windows
///
public abstract class EditorWindow : DockWindow
{
- private bool _mouseDown;
-
///
/// Gets the editor object.
///
@@ -40,6 +38,7 @@ namespace FlaxEditor.Windows
protected EditorWindow(Editor editor, bool hideOnClose, ScrollBars scrollBars)
: base(editor.UI.MasterPanel, hideOnClose, scrollBars)
{
+ AutoFocus = true;
Editor = editor;
InputActions.Add(options => options.ContentFinder, () =>
@@ -225,41 +224,6 @@ namespace FlaxEditor.Windows
return false;
}
- ///
- public override bool OnMouseDown(Float2 location, MouseButton button)
- {
- if (base.OnMouseDown(location, button))
- return true;
- if (button == MouseButton.Left)
- {
- _mouseDown = true;
- return true;
- }
- return false;
- }
-
- ///
- public override bool OnMouseUp(Float2 location, MouseButton button)
- {
- if (base.OnMouseUp(location, button))
- return true;
- if (button == MouseButton.Left && _mouseDown)
- {
- _mouseDown = false;
- Focus();
- return true;
- }
- return false;
- }
-
- ///
- public override void OnMouseLeave()
- {
- _mouseDown = false;
-
- base.OnMouseLeave();
- }
-
///
public override void OnDestroy()
{