atom / fuzzy-finder

Find and open files quickly
MIT License
275 stars 138 forks source link

fuzzy-finder doesn't withhold keyboard events that fire during re-index and panel opening #288

Closed dwelle closed 7 years ago

dwelle commented 7 years ago

Prerequisites

Description

Since 1.16.0 either the project reindexing perf drastically downgraded, or there's a regression (or both) that causes the text typed after user hits ctrl + p being added to editor instead of the fuzzy-finder panel, provided user starts to type before reindexing is done and panel opens.

AFAIK this never happened to me before and I always start to type well before the panel opens (waiting for and ensuring the panel is open before typing is really bad UX).

This causes major problems if one's not careful and the nonsense text goes through linting, CRs etc. (not that often -- but still causes major pain due to constant refactor, backtracking etc.)

Steps to Reproduce

  1. open a project with moderate amount of files so that reindexing takes considerable time (0.5-1s+)
  2. blur & refocus atom to ensure reindexing
  3. ctrl + p and start typing right away

Expected behavior: should enqueue the keyboard events until the panel opens (or whatever other implem), and seamlessly paste whatever user typed before it opened

Actual behavior: the text that's typed before the panel opens is entered into file buffer

Reproduces how often: 100% (well, practically every time I fuzzy-search for file after de-focusing atom, which is nearly always)

Versions

atom 1.16.0, fuzzy-finder 1.5.0, win 7

related

If I checked correctly, between atom 1.15.01.16.0, one related bump happened:

50Wliu commented 7 years ago

Thanks for opening a new bug report @dwelle. I've edited it slightly because some of your version investigations weren't correct, but many thanks for taking the time to do that research :).

This looks like a regression caused by the removal of jQuery. /cc @as-cii

iolsen commented 7 years ago

@as-cii can you investigate this one? Looks related to jquery removal.