Skip to content

Commit

Permalink
fix: optimizeSelection right mouse click bug (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
colorpeach authored May 9, 2020
1 parent 4372763 commit dac0794
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Diff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ const setUserSelectStyle = (element, selectable) => {
const Diff = props => {
const root = useRef(null);
const enableColumnSelection = useCallback(
({target}) => {
({target, button}) => {
if (button !== 0) {
return;
}

const closestCell = findClosest(target, 'diff-code');

if (!closestCell) {
Expand Down

0 comments on commit dac0794

Please sign in to comment.