Skip to content

double click inside selection in an inactive view - for example, the find/replace box = no focus change when drag_text is true #1162

@keith-hall

Description

@keith-hall

Sublime Text 3 build 3109
Windows 7 x64
Fresh install, no plugins

With the find and replace panel open, double clicking in the find or replace input boxes don't always set the focus correctly, so even though it selects the word, when you type, it will type in the wrong box.

Reproduction steps: (can be done on a blank document)

  1. Open the find and replace panel (Find menu -> Replace...)
  2. In Find What, type hello
  3. Press tab
  4. In Replace With, type world
  5. Double click in Find What to select the word hello
  6. Double click in Replace With to select the word world
  7. Type foobar
  8. Double click in Find What to select the word hello (yes, even though it is already selected)
  9. Type here - notice that here appears in the wrong input box

You can repeat it in the other input box too:

  1. Open the find and replace panel (Find menu -> Replace...)
  2. In Find What, type hello
  3. Press tab
  4. In Replace With, type world
  5. Double click in Replace With to select the word world
  6. Double click in Find What to select the word hello
  7. Type foobar
  8. Double click in Replace With to select the word world (yes, even though it is already selected)
  9. Type here - notice that here appears in the wrong input box

Expected behavior:

  • When double clicking in an input box:
    • that box should get the focus (* this is not happening)
    • the word under the cursor should be selected
    • the input box should keep the focus

Also tested on Linux on 3103, and when moving between input boxes, the previous input box loses the selection, so this bug doesn't exist on Linux.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions