Skip to content

Commit ef15313

Browse files
committed
fix: text selection bug
1 parent 608974b commit ef15313

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/VueCommand.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ export default {
350350
351351
// Focus on last Stdin or search
352352
focus () {
353+
// If user selected any text skip setting focus as otherwise the selection gets removed
354+
if (window.getSelection().toString() !== '') return
355+
353356
// Check if search mode
354357
if (this.isSearch) {
355358
this.$refs.search.focus()

0 commit comments

Comments
 (0)