From 632e4c1d312800bc43d570f3a4c2c105faccf009 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 24 Jul 2019 17:59:01 +0800 Subject: [PATCH] [bugfix] Tabs: fix scroll position deviation when sticky (#3949) --- src/tabs/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tabs/index.js b/src/tabs/index.js index 23b8a4fb5..177ff59ea 100644 --- a/src/tabs/index.js +++ b/src/tabs/index.js @@ -120,7 +120,7 @@ export default createComponent({ // scroll to correct position if (this.stickyFixed) { - setRootScrollTop(getElementTop(this.$el) - this.offsetTop); + setRootScrollTop(Math.ceil(getElementTop(this.$el) - this.offsetTop)); } } },