diff options
author | Vik Vorona <viktor.vorona@sonarsource.com> | 2023-05-24 09:22:55 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-05-24 20:03:13 +0000 |
commit | daabab60cd13a1b42457869af0523d96d6eb6b6a (patch) | |
tree | 06d9bbb6da2ef46ad418884c3459ea2c6fb82a61 /server/sonar-web | |
parent | d8b7397bfb96f0369c61f5430d4292de38f4ec1e (diff) | |
download | sonarqube-daabab60cd13a1b42457869af0523d96d6eb6b6a.tar.gz sonarqube-daabab60cd13a1b42457869af0523d96d6eb6b6a.zip |
SONAR-19146 Fix 'dancing' scrollbars in presence of a spinner (#8330)
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Checkbox-test.tsx.snap | 14 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/components/ui/DeferredSpinner.tsx | 22 |
2 files changed, 21 insertions, 15 deletions
diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Checkbox-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Checkbox-test.tsx.snap index ea68408df35..ae3c407b7bd 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Checkbox-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Checkbox-test.tsx.snap @@ -39,11 +39,15 @@ exports[`should render the checkbox on the right 1`] = ` <a> child </a> - <i - aria-live="polite" - class="deferred-spinner a11y-hidden" - data-testid="deferred-spinner" - /> + <div + class="sw-overflow-hidden" + > + <i + aria-live="polite" + class="deferred-spinner a11y-hidden" + data-testid="deferred-spinner" + /> + </div> <i class="icon-checkbox icon-checkbox-checked" /> diff --git a/server/sonar-web/src/main/js/components/ui/DeferredSpinner.tsx b/server/sonar-web/src/main/js/components/ui/DeferredSpinner.tsx index 5b9b8550be9..e619906e2ff 100644 --- a/server/sonar-web/src/main/js/components/ui/DeferredSpinner.tsx +++ b/server/sonar-web/src/main/js/components/ui/DeferredSpinner.tsx @@ -92,16 +92,18 @@ export default class DeferredSpinner extends React.PureComponent<Props, State> { return ( <> - <i - aria-live="polite" - data-testid="deferred-spinner" - className={classNames('deferred-spinner', className, { - 'a11y-hidden': !showSpinner, - 'is-loading': showSpinner, - })} - > - {showSpinner && <span className="a11y-hidden">{ariaLabel}</span>} - </i> + <div className="sw-overflow-hidden"> + <i + aria-live="polite" + data-testid="deferred-spinner" + className={classNames('deferred-spinner', className, { + 'a11y-hidden': !showSpinner, + 'is-loading': showSpinner, + })} + > + {showSpinner && <span className="a11y-hidden">{ariaLabel}</span>} + </i> + </div> {!showSpinner && children} </> ); |