summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2021-03-29 19:51:20 +0200
committerOskar Nyberg <oskar@mullvad.net>2021-07-02 16:15:01 +0200
commiteef48516140073514d86ce97ffd5a7b042b66b0d (patch)
tree00597a2ce34513978d4110a322e3d499ccd82b7c /gui/src
parentdb0d3cda1c54c32e8eae82fd6de726f54230e7d4 (diff)
downloadmullvadvpn-eef48516140073514d86ce97ffd5a7b042b66b0d.tar.xz
mullvadvpn-eef48516140073514d86ce97ffd5a7b042b66b0d.zip
Add "smooth" option to CustomScrollbars
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/renderer/components/CustomScrollbars.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/src/renderer/components/CustomScrollbars.tsx b/gui/src/renderer/components/CustomScrollbars.tsx
index 87c5b82dce..2b5119839c 100644
--- a/gui/src/renderer/components/CustomScrollbars.tsx
+++ b/gui/src/renderer/components/CustomScrollbars.tsx
@@ -72,10 +72,10 @@ export default class CustomScrollbars extends React.Component<IProps, IState> {
this.updateScrollbarsHelper({ size: true });
});
- public scrollToTop() {
+ public scrollToTop(smooth = false) {
const scrollable = this.scrollableRef.current;
if (scrollable) {
- scrollable.scrollTop = 0;
+ scrollable.scrollTo({ top: 0, behavior: smooth ? 'smooth' : 'auto' });
}
}