Skip to content

Commit a28f761

Browse files
authored
Merge pull request #19 from martinRenou/fix_dbl_click_files
Fix double-click for files
2 parents bab0664 + db1fd29 commit a28f761

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/unfold.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,12 @@ export class DirTreeListing extends DirListing {
210210
private async _eventDblClick(event: MouseEvent): Promise<void> {
211211
const entry = this.modelForClick(event);
212212

213-
if (entry?.type === 'directory' && !this._singleClickToUnfold) {
214-
this.model.toggle(entry.path);
213+
if (entry?.type === 'directory') {
214+
if (!this._singleClickToUnfold) {
215+
this.model.toggle(entry.path);
216+
}
217+
} else {
218+
super.handleEvent(event);
215219
}
216220
}
217221

0 commit comments

Comments
 (0)