Skip to content

Commit f33c56b

Browse files
committed
fix: clicks not being passed to card children when in focus
1 parent e075ce6 commit f33c56b

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

src/library-authoring/LibraryBlock/LibraryBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const LibraryBlock = ({
6060
frameBorder="0"
6161
loading="lazy"
6262
referrerPolicy="origin"
63-
style={{ width: '100%', height: iframeHeight }}
63+
style={{ width: '100%', height: iframeHeight, pointerEvents: 'auto' }}
6464
allow={IFRAME_FEATURE_POLICY}
6565
allowFullScreen
6666
scrolling={scrolling}

src/library-authoring/units/index.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,24 @@
88

99
.pgn__card.clickable {
1010
box-shadow: none;
11+
// this is required for clicks to be captured by card and iframe when it is not in focus
12+
pointer-events: auto;
13+
&:focus {
14+
// this is required for clicks to be passed to underlying iframe component
15+
pointer-events: none;
16+
}
17+
}
18+
19+
.pgn__action-row {
20+
// this is required for clicks to be captured by card header
21+
pointer-events: auto;
1122
}
1223

1324
.pgn__card.clickable:hover {
1425
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.15), 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15);
1526
}
27+
28+
.sortable-item-children {
29+
pointer-events: auto;
30+
}
1631
}

0 commit comments

Comments
 (0)