adobe/brackets — pull request #5872 by njx (2013-11-06 19:42:56+00:00)
Title: 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 do `git submodule update --init` again afterwards to get it back.

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 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.)