Skip to content

Commit

Permalink
fix(Tab): issues of closable
Browse files Browse the repository at this point in the history
  • Loading branch information
guanpu committed Apr 11, 2019
1 parent 5358921 commit 05ec227
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/tab/tabs/nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ class Nav extends React.Component {
ctx.scrollTimer = setTimeout(() => {
ctx.scrollToActiveTab();
}, 410); // transition-duration is set to be .4s, wait for the transition finishes before re-calc
ctx.setSlideBtn();
clearTimeout(ctx.slideTimer);
ctx.slideTimer = setTimeout(() => {
ctx.setSlideBtn();
}, 200);
if (
this.activeTab &&
findDOMNode(this).contains(document.activeElement)
Expand Down Expand Up @@ -237,6 +240,7 @@ class Nav extends React.Component {
if (minOffset >= 0 || navWH <= navbarWH) {
next = false;
prev = false;
this.setOffset(0, false); // no need to check slide again since this call is invoked from inside setSlideBtn
} else if (this.offset < 0 && this.offset <= minOffset) {
prev = true;
next = false;
Expand Down

0 comments on commit 05ec227

Please sign in to comment.