Skip to content

Find command doesn't reset search text if Find box is open #8671

Closed

Description

Environment

Windows build number: 10.0.19042.0
Windows Terminal version (if applicable): 1.4.3243.0

Steps to reproduce

Execute "find" command, default keybinding is "ctrl+shift+f".
Type "hello".
Execute "find" command again, default keybinding is "ctrl+shift+f".
Type "world".

Expected behavior

Find box opened with text "world" in it.

Actual behavior

Find box opened with text "helloworld" in it.

Why do I think this bug? Because this is behavior of most applications. e.g: Edge, Visual Studio, Visual Studio Code...

I think easiest and most correct fix would be to "select all" text when Find command in executed and FindBox is already opened.

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Dec 28, 2020
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Dec 28, 2020
  3. zadjii-msft commented on Jan 3, 2021

    @zadjii-msft
    Member

    Don-Vito will this also conveniently be fixed by #8521?

  4. Don-Vito commented on Jan 3, 2021

    @Don-Vito
    Contributor

    Mike Griese (@zadjii-msft) - welcome back man! 😊
    Nope - it won't be fixed by this PR. I believe there is no flow today that cleanups the needle. We only override it if something was selected, we do not override with empty string.
    I've seen this as a kind of a feature 😄 I can absolutely fix it.
    Pay attention that if hello was found in the text it will be selected and thus populated in any case.

  5. zadjii-msft commented on Jan 3, 2021

    @zadjii-msft
    Member

    Don-Vito Thanks!

    I'm mostly thinking about the

    "select all" text when Find command in executed and FindBox is already opened.

    solution. That's probably what we'd want to do here.

  6. added
    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    on Jan 3, 2021
  7. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Jan 3, 2021
  8. Don-Vito commented on Jan 3, 2021

    @Don-Vito
    Contributor

    Mike Griese (@zadjii-msft) - wait... 😄 probably I don't know what select all means.. because as of 1.4 (or even earlier) we do select all the text in the searchbox when invoking the find command.

    I think that the main problem in this ticket is that we didn't receive commands when search box is in focus (resolved by #8586).

  9. DavidKarlas commented on Jan 3, 2021

    @DavidKarlas
    Author

    Looks like if I click with mouse on terminal to move focus out of FindBox, and press FindCommand keys it focused FindBox again and selects all text, but if I never leave FindBox and press FindCommand keys again nothing happens.

  10. Don-Vito commented on Jan 3, 2021

    @Don-Vito
    Contributor

    David Karlaš (@DavidKarlas) - thanks! It makes sense. We had a defect that when you are focusing on the FindBox the shortcuts are not executed. So when you press FindCommand keys or shortcut of every other command nothing happens (when focused on the FindBox try to click ctrl-shift-p to see that the command palette is not open as well). We fixed it here: #8586.

  11. zadjii-msft commented on Jan 3, 2021

    @zadjii-msft
    Member

    Ahhhhh okay yep, that makes sense. I'll close this one as a dupe, since they had the same root cause.

    /dup #6679

    Thanks!

  12. ghost closed this as completedon Jan 3, 2021
  13. ghost removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jan 3, 2021
  14. ghost added
    Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.
    on Jan 3, 2021
  15. DavidKarlas commented on Jan 3, 2021

    @DavidKarlas
    Author

    Yep its seems to be same issue, Ctrl+Shift+P also doesn't have effect... Is there any preview/internals channel that has this fix?

  16. Don-Vito commented on Jan 3, 2021

    @Don-Vito
    Contributor

    David Karlaš (@DavidKarlas) - not that I am aware of (beyond building from source code)..
    Probably Mike Griese (@zadjii-msft) can help - I would also love to learn what and when gets released 😄

  17. zadjii-msft commented on Jan 4, 2021

    @zadjii-msft
    Member

    We don't really have a more specific timeline to share for 1.6 other than "later in January" - there's a longer release cycle here because of the long holidays. Otherwise it's usually about once a month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issue-BugIt either shouldn't be doing this or needs an investigation.Priority-3A description (P3)Product-TerminalThe new Windows Terminal.Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions