-
Notifications
You must be signed in to change notification settings - Fork 7.6k
QuickOpen: Don't trigger item focus on hover #5872
Conversation
…m upstream repo (as local files). Point Brackets at new version. NOTE that this commit breaks Quick Open, but I wanted to keep this commit at the exact version from the original repo--the next commit will fix Quick Open.
/cc @SAplayer @WebsiteDeveloper @larz0 - see note at beginning of pull request about dealing with the submodule change when you check out this branch. |
@njx This looks good. Thanks for splitting the changes into atomic commits! I have a question before I merge: is there anything that can be done by me when merging this pull request to try to avoid the |
I don't think there's any automatic thing we can do, except that we should let people know that, if possible, they should do |
Hmmm, no, it looks like you can't do the deinit after pulling the changes. That's still probably fine--people just have to manually remove the files, and the only issue is that there will still be some stale stuff left in their |
(Note that we won't have the same need to do |
I guess there's nothing that can be done. The worst problem is when you jump between a bunch of branches that are before/after the change. Oh, well. Merging. |
QuickOpen: Don't trigger item focus on hover
For #4791.
NOTE: if you pull this branch to review it, your life will be happier if you do
git submodule deinit src/thirdparty/smart-auto-complete
before checking it out--this will clean up your local state. If you then need to check out master again, just dogit submodule update --init
again afterwards to get it back. You need git 1.8.4 or later to usedeinit
.Smart-autocomplete didn't distinguish between arrow-key selection and mouse hover, so if you happened to bump the mouse over the list while using Quick Open and then hit Enter, it would select the item the mouse was over instead of the first item or the item you selected with arrow keys.
We decided to go ahead and just monkeypatch smart-autocomplete since we will likely replace it in the future anyway. So, the first commit below (7338907) just pulls in the latest source from the upstream repo into
smart-auto-complete-local
and removes the old submodule. It should be exactly the same except that I added a note at the beginning of the README indicating where it came from.The second commit (faf21e0) reverts a patch in the upstream repo that breaks Quick Open in Brackets. Its original intention was to make it so holding down the arrow keys would properly repeat. We should eventually look at a fix for that, but it would likely require changes to the (fragile) key handling in Quick Open and smart autocomplete.
The third commit (e6f50d6) is the actual fix for this bug. It simply comments out the JS mouseenter/mouseleave handlers (so itemFocus/itemUnfocus no longer gets sent out for mouseovers), and just adds a simple highlight in CSS. (The other changes in the LESS file are just a small refactoring to move some separate rules into nested &-rules.)