aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2018-11-12 13:30:22 +0100
committerSonarTech <sonartech@sonarsource.com>2018-11-15 20:20:59 +0100
commitc1e706a4149d47a5e4f76fe409c5a100ecb5695d (patch)
treef84b9bbabd10a1d7f16802cb643dccd2edbf9d83 /server/sonar-web/src/main/js
parent7603295e6d3d423c9bdb99a24c1ec589117ab435 (diff)
downloadsonarqube-c1e706a4149d47a5e4f76fe409c5a100ecb5695d.tar.gz
sonarqube-c1e706a4149d47a5e4f76fe409c5a100ecb5695d.zip
SONAR-11474 Code viewer header stay fixed when scrolling horizontally
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/styles.css7
2 files changed, 6 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx
index a3d1fc4211d..c1a034d4dc5 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx
+++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx
@@ -214,7 +214,7 @@ export default class SourceViewerCode extends React.PureComponent<Props> {
const hasFileIssues = displayIssues && issues.some(issue => !issue.textRange);
return (
- <div>
+ <div className="source-viewer-code">
{this.props.hasSourcesBefore && (
<div className="source-viewer-more-code">
{this.props.loadingSourcesBefore ? (
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/styles.css b/server/sonar-web/src/main/js/components/SourceViewer/styles.css
index 2d1a80c67b1..ea83bb7f525 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/styles.css
+++ b/server/sonar-web/src/main/js/components/SourceViewer/styles.css
@@ -23,8 +23,7 @@
border: 1px solid var(--gray80);
box-sizing: border-box;
background-color: #fff;
- overflow-x: auto;
- overflow-y: hidden;
+ overflow: hidden;
}
.source-table {
@@ -368,6 +367,10 @@
line-height: 1.8;
}
+.source-viewer-code {
+ overflow-x: auto;
+}
+
.source-viewer-measures-overlay {
width: 1100px;
left: 50%;