From 2906bdd699e53cf280d3802e2aee9f4252cbad31 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Fri, 14 Jul 2017 02:45:40 -0700 Subject: [PATCH] Fire layout updates before attempting to scroll (improves docExpansion:none support) --- src/core/plugins/deep-linking/spec-wrap-actions.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/plugins/deep-linking/spec-wrap-actions.js b/src/core/plugins/deep-linking/spec-wrap-actions.js index 9d9b2847..bb13a6ff 100644 --- a/src/core/plugins/deep-linking/spec-wrap-actions.js +++ b/src/core/plugins/deep-linking/spec-wrap-actions.js @@ -31,16 +31,19 @@ export const updateResolved = (ori, { layoutActions, getConfigs }) => (...args) if(tag && operationId) { // Pre-expand and scroll to the operation + layoutActions.show(["operations-tag", tag], true) + layoutActions.show(["operations", tag, operationId], true) + scrollTo(`#operations-${tag}-${operationId}`, { offset: SCROLL_OFFSET }) - layoutActions.show(["operations", tag, operationId], true) } else if(tag) { // Pre-expand and scroll to the tag + layoutActions.show(["operations-tag", tag], true) + scrollTo(`#operations-tag-${tag}`, { offset: SCROLL_OFFSET }) - layoutActions.show(["operations-tag", tag], true) } }