Skip to content

Commit d7f0356

Browse files
committed
Various minor front-end code improvements.
1 parent 682c108 commit d7f0356

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

web/dropdown.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ class Dropdown {
141141
*/
142142
public selectOption(value: string) {
143143
const optionIndex = this.options.findIndex((option) => value === option.value);
144-
if (this.multipleAllowed && optionIndex > -1 && !this.optionsSelected[optionIndex]) {
144+
if (this.multipleAllowed && optionIndex > -1 && !this.optionsSelected[0] && !this.optionsSelected[optionIndex]) {
145145
// Select the option with the specified value
146146
this.optionsSelected[optionIndex] = true;
147147

148-
if (!this.optionsSelected[0] && this.optionsSelected.slice(1).every((selected) => selected)) {
148+
if (this.optionsSelected.slice(1).every((selected) => selected)) {
149149
// All options are selected, so simplify selected items to just be "Show All"
150150
this.optionsSelected[0] = true;
151151
for (let i = 1; i < this.optionsSelected.length; i++) {

web/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,6 +2079,7 @@ class GitGraphView {
20792079
index: this.commitLookup[this.expandedCommit.commitHash],
20802080
elem: <HTMLElement>eventTarget
20812081
};
2082+
GitGraphView.closeCdvContextMenuIfOpen(this.expandedCommit);
20822083
this.expandedCommit.contextMenuOpen.summary = true;
20832084
} else if ((eventElem = <HTMLElement | null>eventTarget.closest('.commit')) !== null) {
20842085
// URL is in the Commits
@@ -2911,6 +2912,7 @@ class GitGraphView {
29112912
const commitOrder = this.getCommitOrder(expandedCommit.commitHash, expandedCommit.compareWithHash === null ? expandedCommit.commitHash : expandedCommit.compareWithHash);
29122913
const isUncommitted = commitOrder.to === UNCOMMITTED;
29132914

2915+
GitGraphView.closeCdvContextMenuIfOpen(expandedCommit);
29142916
expandedCommit.contextMenuOpen.fileView = parseInt(fileElem.dataset.index!);
29152917

29162918
const target: ContextMenuTarget & CommitTarget = {

web/styles/contextMenu.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
display:block;
33
position:absolute;
44
background-color:var(--vscode-menu-background);
5-
box-shadow:0 1px 6px 1px var(--vscode-widget-shadow);
5+
box-shadow:0 1px 4px 1px var(--vscode-widget-shadow);
66
color:var(--vscode-menu-foreground);
77
list-style-type:none;
88
margin:0;

0 commit comments

Comments
 (0)