Merge pull request #1737 from rndevfx/window-requestAnimationFrame

Use window.requestAnimationFrame in Tabs.js
old
Rubén Moya 2018-01-23 18:18:29 +01:00 committed by GitHub
commit 3f1472567e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ const factory = (Tab, TabContent, FontIcon) => {
updatePointer = (idx) => {
if (this.navigationNode && this.navigationNode.children[idx]) {
this.updatePointerAnimationFrame = requestAnimationFrame(() => {
this.updatePointerAnimationFrame = window.requestAnimationFrame(() => {
const nav = this.navigationNode.getBoundingClientRect();
const label = this.navigationNode.children[idx].getBoundingClientRect();
const scrollLeft = this.navigationNode.scrollLeft;