Commit a02c58a
fix(diff): ignore double-click in blank area outside diff lines
Double-clicking in the empty area below the last file caused the browser
to snap-select the nearest text node (the last diff line), which both
flashed a stray highlight and incorrectly opened the inline input.
Bail out of the mouseup handler when the click target isn't inside a
diff line, and preventDefault on mousedown for double-clicks outside
diff lines so the browser never creates the ghost selection.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a35c05a commit a02c58a
1 file changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
894 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
895 | 916 | | |
896 | 917 | | |
897 | 918 | | |
| |||
911 | 932 | | |
912 | 933 | | |
913 | 934 | | |
| 935 | + | |
914 | 936 | | |
915 | | - | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
916 | 941 | | |
917 | 942 | | |
918 | 943 | | |
| |||
0 commit comments