File tree 2 files changed +12
-2
lines changed
src/shared/components/challenge-listing
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,12 @@ export default function Bucket({
88
88
{
89
89
( expandable || loadMore ) && ! loading && ! expanded ? (
90
90
< button
91
- onClick = { expand }
91
+ onClick = { ( ) => {
92
+ expand ( ) ;
93
+ /* eslint-env browser */
94
+ document . body . scrollTop = 0 ;
95
+ document . documentElement . scrollTop = 0 ;
96
+ } }
92
97
styleName = "view-more"
93
98
> View more challenges</ button >
94
99
) : null
Original file line number Diff line number Diff line change @@ -43,7 +43,12 @@ export default function BucketSelector({
43
43
bucket = { buckets [ bucket ] }
44
44
challenges = { filteredChallenges }
45
45
disabled = { disabled }
46
- onClick = { ( ) => selectBucket ( bucket ) }
46
+ onClick = { ( ) => {
47
+ selectBucket ( bucket ) ;
48
+ /* eslint-env browser */
49
+ document . body . scrollTop = 0 ;
50
+ document . documentElement . scrollTop = 0 ;
51
+ } }
47
52
/>
48
53
) ;
49
54
You can’t perform that action at this time.
0 commit comments