Skip to content

Commit

Permalink
fix: super long string can be partially selected without collapsing
Browse files Browse the repository at this point in the history
  • Loading branch information
deand0n committed Oct 9, 2023
1 parent 76322b9 commit e7fc973
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/DataTypes/String.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const stringType = defineEasyType<string>({
cursor: hasRest ? 'pointer' : 'inherit'
}}
onClick={() => {
if (window.getSelection()?.type === 'Range') {
return
}

Check warning on line 30 in src/components/DataTypes/String.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/DataTypes/String.tsx#L29-L30

Added lines #L29 - L30 were not covered by tests

if (hasRest) {
setShowRest(value => !value)
}
Expand Down

0 comments on commit e7fc973

Please sign in to comment.