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

Commit

Permalink
QuickOpen: Don't trigger item focus on hover--just show a hover highl…
Browse files Browse the repository at this point in the history
…ight via CSS
  • Loading branch information
Narciso Jaramillo committed Nov 6, 2013
1 parent faf21e0 commit e6f50d6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/styles/brackets.less
Original file line number Diff line number Diff line change
Expand Up @@ -1089,14 +1089,18 @@ a, img {
list-style: none;
cursor: default;
padding: 6px 10px;
}

li:nth-child(odd) {
background-color: @tc-lighter-gray;
}

&:nth-child(odd) {
background-color: @tc-lighter-gray;
}

&:hover {
background-color: @tc-hover-highlight;
}

li.smart_autocomplete_highlight {
background-color: @tc-highlight;
&.smart_autocomplete_highlight {
background-color: @tc-highlight;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@
}
});

// Brackets monkeypatch: don't trigger item focus/unfocus events on mouseenter/mouseleave, since we don't
// want to select an item just by mousing over it. We just want an ordinary hover highlight, which we apply
// through CSS directly.
/*
//bind events to results container
$(options.resultsContainer).delegate(options.resultElement, "mouseenter.smart_autocomplete", function(){
var old_selection = options.currentSelection || 0;
Expand All @@ -524,6 +528,7 @@
$(options.resultsContainer).delegate(options.resultElement, "mouseleave.smart_autocomplete", function(){
$(options.context).trigger("itemUnfocus", [this] );
});
*/

$(options.resultsContainer).delegate(options.resultElement, "mousedown.smart_autocomplete", function(){
$(options.context).trigger("itemSelect", [this]);
Expand Down

0 comments on commit e6f50d6

Please sign in to comment.