diff options
author | David Cho-Lerat <117642976+david-cho-lerat-sonarsource@users.noreply.github.com> | 2022-11-23 17:43:07 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-11-23 20:02:53 +0000 |
commit | 1987eaeefc76a33e3199536c770ae394b2ddb845 (patch) | |
tree | cbe8d9e1775fa40b13643a0410327b68592a222a /server | |
parent | 9d2a38de3347dc85890fae454f82154a52267a69 (diff) | |
download | sonarqube-1987eaeefc76a33e3199536c770ae394b2ddb845.tar.gz sonarqube-1987eaeefc76a33e3199536c770ae394b2ddb845.zip |
SONAR-17595 Fix inconsistent behavior when clicking on message of issues with secondary locations (#7058)
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx | 3 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx index ec9ef204ef6..b29c89f83f4 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx @@ -387,8 +387,7 @@ export class App extends React.PureComponent<Props, State> { if (path.query.open && path.query.open === this.state.openIssue.key) { this.setState({ locationsNavigator: false, - selectedFlowIndex: undefined, - selectedLocationIndex: undefined, + selectedLocationIndex: -1, }); } else { this.props.router.replace(path); diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx index 282dde3441e..8d28db60015 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx @@ -76,6 +76,7 @@ export default class IssuesSourceViewer extends React.PureComponent<IssuesSource }); } else if (this.primaryLocationRef) { this.primaryLocationRef.scrollIntoView({ + behavior: 'smooth', block: 'center', inline: 'nearest', }); |