diff --git a/osu.Framework/Graphics/UserInterface/TextBox.cs b/osu.Framework/Graphics/UserInterface/TextBox.cs index 6d3ee16c2d..c716ebc98d 100644 --- a/osu.Framework/Graphics/UserInterface/TextBox.cs +++ b/osu.Framework/Graphics/UserInterface/TextBox.cs @@ -240,12 +240,15 @@ public virtual bool OnPressed(KeyBindingPressEvent e) // Clipboard case PlatformAction.Cut: case PlatformAction.Copy: - if (string.IsNullOrEmpty(SelectedText) || !AllowClipboardExport) return true; + if (!AllowClipboardExport) return false; - clipboard.SetText(SelectedText); + if (!string.IsNullOrEmpty(SelectedText)) + { + clipboard.SetText(SelectedText); - if (e.Action == PlatformAction.Cut) - DeleteBy(0); + if (e.Action == PlatformAction.Cut) + DeleteBy(0); + } return true;