File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
packages/components/bolt-with-without Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,13 @@ const handleBlockTitleMobileAccordionClick = async e => {
16
16
const targetIsTitle = e . target . classList . contains ( 'c-pega-wwo__block-title' ) ;
17
17
const targetIsToggler = targetIsIcon || targetIsTitle ;
18
18
const isMobile = window . matchMedia ( mediaQuery ) . matches ;
19
-
19
+
20
20
if ( ! targetIsToggler || ! isMobile ) {
21
21
return ;
22
22
}
23
23
24
- // @TODO remove tight coupling between markup structure and this.
25
- const parentBlock =
26
- e . target . parentElement . parentElement . parentElement . parentElement ;
24
+ // @TODO `closest()` may not be polyfilled/transpiled on IE.
25
+ const parentBlock = e . target . closest ( '.c-pega-wwo__block' ) ;
27
26
const targetIsExpanded = parentBlock . classList . contains ( expandedClass ) ;
28
27
if ( targetIsExpanded ) {
29
28
parentBlock . classList . remove ( expandedClass ) ;
Original file line number Diff line number Diff line change @@ -772,7 +772,7 @@ bolt-animate {
772
772
display : block ;
773
773
overflow : hidden ;
774
774
775
- & [meta-stage = " INITIAL " ] {
775
+ & :not ( [meta-stage ]) {
776
776
max-height : 0 ;
777
777
}
778
778
@@ -781,9 +781,6 @@ bolt-animate {
781
781
overflow : visible ;
782
782
}
783
783
}
784
-
785
- & .c-pega-wwo__block-expanded .c-pega-wwo__block-contents {
786
- }
787
784
}
788
785
}
789
786
& -result {
You can’t perform that action at this time.
0 commit comments