Skip to content

Commit 0220cc4

Browse files
Add preventDefault to stop creating / moving
This is to prevent the whole map from closing in case of moving/creating a stop.
1 parent 0684b79 commit 0220cc4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ui/src/components/map/stops/CreateStopMarker.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const CreateStopMarker = ({ onCursorMove }: Props): JSX.Element => {
3636

3737
const detectKeyDown = (e: KeyboardEvent) => {
3838
if (e.key === 'Escape') {
39+
e.preventDefault();
3940
dispatch(resetEnabledModesAction());
4041
}
4142
};

0 commit comments

Comments
 (0)