File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/webviews/apps/plus/composer/components Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -101,16 +101,17 @@ export class CommitItem extends LitElement {
101101 this . dataset . commitId = this . commitId ;
102102 }
103103
104- private handleClick ( e : MouseEvent | KeyboardEvent ) {
105- // Don't select commit if clicking on drag handle
106- if ( ( e . target as HTMLElement ) . closest ( '.drag-handle' ) || ( e instanceof KeyboardEvent && e . key !== 'Enter' ) ) {
107- return ;
108- }
109-
104+ private handleMouseDown ( e : MouseEvent ) {
110105 // Prevent text selection when shift-clicking
111106 if ( e . shiftKey ) {
112107 e . preventDefault ( ) ;
113108 }
109+ }
110+
111+ private handleClick ( e : MouseEvent | KeyboardEvent ) {
112+ if ( ( e . target as HTMLElement ) . closest ( '.drag-handle' ) || ( e instanceof KeyboardEvent && e . key !== 'Enter' ) ) {
113+ return ;
114+ }
114115
115116 this . dispatchEvent (
116117 new CustomEvent ( 'commit-selected' , {
@@ -136,6 +137,7 @@ export class CommitItem extends LitElement {
136137 tabindex ="0"
137138 @click=${ this . handleClick }
138139 @keydown=${ this . handleClick }
140+ @mousedown=${ this . handleMouseDown }
139141 >
140142 ${ when (
141143 ! this . isPreviewMode ,
You can’t perform that action at this time.
0 commit comments