Click-and-drag does not cause search field to lose focus #21946

Open
opened 2026-01-31 07:59:05 +00:00 by claunia · 1 comment
Owner

Originally created by @Marcono1234 on GitHub (Jul 9, 2024).

Windows Terminal version

1.20.11781.0

Windows build number

10.0.19045.4529

Other Software

No response

Steps to reproduce

Settings:

  • "Automatically copy selection to clipboard" (copyOnSelect): false
  • "Automatically focus pane on mouse hover" (focusFollowMouse): false

Steps:

  1. Echo some arbitrary text on the console
    (not needed if for example PowerShell automatically printed its version; or the current working directory)
  2. Open the search: Ctrl + Shift + F
  3. Click-and-drag to select any of the output from step 1
    ℹ️ Note: Do not perform a separate left click; instead press down the mouse button and directly start dragging your mouse
  4. Try for example to copy the selection with Ctrl + C

Expected Behavior

Step 3: The search text field lost focus; the console output got focus
Step 4: You copied your selection to the clipboard

Actual Behavior

Step 3: A text selection is shown for the console output, but the search text field still has focus
Step 4: You did not copy anything because the search text field still has focus

Side note: If instead of click-and-drag you perform a separate click (press and release) first, then the console output properly has focus.

Originally created by @Marcono1234 on GitHub (Jul 9, 2024). ### Windows Terminal version 1.20.11781.0 ### Windows build number 10.0.19045.4529 ### Other Software _No response_ ### Steps to reproduce Settings: - "Automatically copy selection to clipboard" (`copyOnSelect`): false - "Automatically focus pane on mouse hover" (`focusFollowMouse`): false Steps: 1. Echo some arbitrary text on the console (not needed if for example PowerShell automatically printed its version; or the current working directory) 2. Open the search: <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>F</kbd> 3. Click-and-drag to select any of the output from step 1 ℹ️ Note: Do not perform a separate left click; instead press down the mouse button and directly start dragging your mouse 4. Try for example to copy the selection with <kbd>Ctrl</kbd> + <kbd>C</kbd> ### Expected Behavior Step 3: The search text field lost focus; the console output got focus Step 4: You copied your selection to the clipboard ### Actual Behavior Step 3: A text selection is shown for the console output, _but_ the search text field still has focus Step 4: You did not copy anything because the search text field still has focus Side note: If instead of click-and-drag you perform a separate click (press and release) first, then the console output properly has focus.
claunia added the Issue-BugProduct-TerminalArea-TerminalControl labels 2026-01-31 07:59:06 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jul 11, 2024):

Good catch!

@zadjii-msft commented on GitHub (Jul 11, 2024): Good catch!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21946