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 authored and pionxzh committed Oct 9, 2023
1 parent 76322b9 commit c2282dd
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
}

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

0 comments on commit c2282dd

Please sign in to comment.