Skip to content

Commit

Permalink
Fix mergeview gutter click buttons
Browse files Browse the repository at this point in the history
Click should only register as final after mouse up with primary button.
  • Loading branch information
vidartf committed Nov 1, 2023
1 parent 08636b8 commit 9884381
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/nbdime/src/common/mergeview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1443,9 +1443,12 @@ export class MergeView extends Panel {
},
initialSpacer: () => pickerMarker,
domEventHandlers: {
mousedown: (editor, line) => {
this.onGutterClick(editor, line);
return true;
mouseup: (editor, line, event) => {

Check warning on line 1446 in packages/nbdime/src/common/mergeview.ts

View check run for this annotation

Codecov / codecov/patch

packages/nbdime/src/common/mergeview.ts#L1446

Added line #L1446 was not covered by tests
if ((event as MouseEvent).button === 0) {
this.onGutterClick(editor, line);
return true;

Check warning on line 1449 in packages/nbdime/src/common/mergeview.ts

View check run for this annotation

Codecov / codecov/patch

packages/nbdime/src/common/mergeview.ts#L1448-L1449

Added lines #L1448 - L1449 were not covered by tests
}
return false;

Check warning on line 1451 in packages/nbdime/src/common/mergeview.ts

View check run for this annotation

Codecov / codecov/patch

packages/nbdime/src/common/mergeview.ts#L1451

Added line #L1451 was not covered by tests
},
},
}),
Expand Down

0 comments on commit 9884381

Please sign in to comment.