diff options
author | ThibG <thib@sitedethib.com> | 2019-06-28 22:35:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-28 22:35:54 +0200 |
commit | 98c2d2aa46c2725b360907cf5537338ac6d052ed (patch) | |
tree | 4b3301453fc3f8bcfe412a5e1bb967ec5c3414c6 /app/javascript/flavours/glitch/features/ui/components | |
parent | f7c0e326ab11a597b17a22dd8889f0690d7ffd73 (diff) | |
parent | 662252c8f77e8dd8fd015bc6ece0943f068b1710 (diff) |
Merge pull request #1146 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui/components')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/columns_area.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/columns_area.js b/app/javascript/flavours/glitch/features/ui/components/columns_area.js index 3a188ca87..30097f064 100644 --- a/app/javascript/flavours/glitch/features/ui/components/columns_area.js +++ b/app/javascript/flavours/glitch/features/ui/components/columns_area.js @@ -112,6 +112,11 @@ export default class ColumnsArea extends ImmutablePureComponent { // React-router does this for us, but too late, feeling laggy. document.querySelector(currentLinkSelector).classList.remove('active'); document.querySelector(nextLinkSelector).classList.add('active'); + + if (!this.state.shouldAnimate && typeof this.pendingIndex === 'number') { + this.context.router.history.push(getLink(this.pendingIndex)); + this.pendingIndex = null; + } } handleAnimationEnd = () => { @@ -162,7 +167,6 @@ export default class ColumnsArea extends ImmutablePureComponent { const { shouldAnimate } = this.state; const columnIndex = getIndex(this.context.router.history.location.pathname); - this.pendingIndex = null; if (singleColumn) { const floatingActionButton = shouldHideFAB(this.context.router.history.location.pathname) ? null : <Link key='floating-action-button' to='/statuses/new' className='floating-action-button' aria-label={intl.formatMessage(messages.publish)}><i className='fa fa-pencil' /></Link>; |