Skip to content

Commit aa7459a

Browse files
scttcperandrewshie-sentry
authored andcommitted
fix(issues): Open drawers without resetting scroll (#89574)
1 parent 1e1cf54 commit aa7459a

File tree

6 files changed

+7
-2
lines changed

6 files changed

+7
-2
lines changed

static/app/components/core/button/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ export const StyledButton = styled(
354354
external,
355355
to,
356356
replace,
357+
preventScrollReset,
357358
href,
358359
disabled,
359360
ref: forwardRefAlt,
@@ -372,6 +373,7 @@ export const StyledButton = styled(
372373
ref={ref as React.Ref<HTMLAnchorElement>}
373374
to={to}
374375
replace={replace}
376+
preventScrollReset={preventScrollReset}
375377
disabled={disabled}
376378
/>
377379
);
@@ -403,6 +405,7 @@ export const StyledButton = styled(
403405
prop === 'forwardRef' ||
404406
prop === 'external' ||
405407
prop === 'replace' ||
408+
prop === 'preventScrollReset' ||
406409
(typeof prop === 'string' && isPropValid(prop)),
407410
}
408411
)<ButtonProps>`

static/app/components/links/link.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export interface LinkProps
3434
* Indicator if the link should be disabled
3535
*/
3636
disabled?: boolean;
37+
preventScrollReset?: ReactRouterLinkProps['preventScrollReset'];
3738
ref?: React.Ref<HTMLAnchorElement>;
3839
replace?: ReactRouterLinkProps['replace'];
3940
state?: ReactRouterLinkProps['state'];

static/app/views/issueDetails/groupEventCarousel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ function EventNavigationButton({
112112
query: {...location.query, referrer},
113113
}}
114114
disabled={disabled}
115+
preventScrollReset
115116
/>
116117
</div>
117118
</Tooltip>

static/app/views/issueDetails/streamline/issueDetailsEventNavigation.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export function IssueDetailsEventNavigation({
134134
pathname: `${baseEventsPath}${event?.previousEventID}/`,
135135
query: {...location.query, referrer: 'previous-event'},
136136
}}
137+
preventScrollReset
137138
css={grayText}
138139
onMouseEnter={handleHoverPagination(
139140
'previous',
@@ -158,6 +159,7 @@ export function IssueDetailsEventNavigation({
158159
pathname: `${baseEventsPath}${event?.nextEventID}/`,
159160
query: {...location.query, referrer: 'next-event'},
160161
}}
162+
preventScrollReset
161163
css={grayText}
162164
onMouseEnter={handleHoverPagination('next', defined(event?.nextEventID))}
163165
onClick={() => {

static/app/views/issueDetails/streamline/sidebar/mergedSidebarSection.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export function MergedIssuesSidebarSection() {
1919
pathname: `${baseUrl}${TabPaths[Tab.MERGED]}`,
2020
query: location.query,
2121
}}
22-
replace
2322
>
2423
{t('View')}
2524
</ViewButton>

static/app/views/issueDetails/streamline/sidebar/similarIssuesSidebarSection.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export function SimilarIssuesSidebarSection() {
1919
pathname: `${baseUrl}${TabPaths[Tab.SIMILAR_ISSUES]}`,
2020
query: location.query,
2121
}}
22-
replace
2322
>
2423
{t('View')}
2524
</ViewButton>

0 commit comments

Comments
 (0)