Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Quick Find Definition doesn't update on paste (when copying between files) #5360

Closed
EvHaus opened this issue Sep 26, 2013 · 4 comments
Closed

Comments

@EvHaus
Copy link

EvHaus commented Sep 26, 2013

Steps to reproduce:

  1. Load two different files in Brackets that both have the same function definition.
  2. Copy the name of the function in File 1.
  3. Go to File 2 in brackets via the Working Files list.
  4. Press Command + T to open the Quick Find Definition input box
  5. Press Command + V to paste into the Quick Find

Note that the Quick Find doesn't update the results. If you press some arrow keys or any other keydown event -- it will eventually fire.

What should happen:

The Quick Find input should detect a paste command and execute the search for that value.

@peterflynn
Copy link
Member

I think this was a known issue but I don't see any other bug tracking it. The problem is that 'smartautocomplete' only listens for key events, not text field change events in general.

We might be able to hack around it by catching oninput and forcing a fake onkeyup -- similar to what QuickNavigateDialog.setSearchFieldValue() does when setting the initial text value. But it would be tricky to do that without triggering double notifications for normal typing input.

@peterflynn
Copy link
Member

Oh, I remember -- this used to work because the keyup from the Ctrl+V shortcut was still visible as a DOM event, and it would trigger smartautocomplete's keyup handler. But now with native menus, I think the shortcut is completely eaten at the native level and no DOM key event occurs.

@ghost ghost assigned dangoor Sep 30, 2013
@njx
Copy link

njx commented Sep 30, 2013

Low pri to @dangoor

@peterflynn
Copy link
Member

This is fixed in the upcoming 1.3 release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants