Skip to content

Commit

Permalink
Stop even propagation on text input fields (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
lewish authored Jul 8, 2024
1 parent c5e9351 commit acbccce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ function NewDrawingButton() {
label="Drawing name"
helperText={!validDrawingName && "Drawing name must be unique."}
defaultValue={defaultNewDrawingName}
onKeyDown={(e) => e.stopPropagation()}
onChange={(e) => setNewDrawingName(e.target.value)}
/>
</DialogContent>
Expand Down Expand Up @@ -603,6 +604,7 @@ function RenameDrawingButton({ drawingId }: { drawingId: DrawingId }) {
label="Drawing name"
helperText={!validDrawingName && "Drawing name already exists."}
defaultValue={defaultNewDrawingName}
onKeyDown={e => e.stopPropagation()}
onChange={(e) => setNewDrawingName(e.target.value)}
/>
</DialogContent>
Expand Down Expand Up @@ -662,6 +664,7 @@ function ForkDrawingButton({
label="Drawing name"
helperText={!validDrawingName && "Drawing name already exists."}
defaultValue={defaultNewDrawingName}
onKeyDown={(e) => e.stopPropagation()}
onChange={(e) => setNewDrawingName(e.target.value)}
/>
</DialogContent>
Expand Down

0 comments on commit acbccce

Please sign in to comment.