Skip to content

Commit c7e8753

Browse files
committed
Disable widgets in edit mode
1 parent 2ced68c commit c7e8753

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Grid.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292
/*opacity var(--transition-time);*/
9393
}
9494

95+
.grid-item.editing > div * {
96+
pointer-events: none;
97+
}
98+
9599
.grid-item.resizing,
96100
.grid-item.dragging {
97101
box-sizing: border-box;

src/Grid.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export function GridItem({
156156
styles.gridItem,
157157
dragging ? styles.dragging : "",
158158
resizing ? styles.resizing : "",
159+
ctx.editing ? styles.editing : "",
159160
!isValid ? styles.invalid : "",
160161
].join(" ")}
161162
style={{

0 commit comments

Comments
 (0)