Execute a Joyride tour involving targets that are within overflow: scroll containers.
Observe overflow: initial being injected by Joyride
After the tour is finished, my scrolling is broken because the injected 'overflow: initial;' takes precedence.
Joyride does not break my scrolling container.
react-joyride: 2.1.1
System:
OS: macOS 10.15.1
CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
Memory: 92.69 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 8.16.1 - /usr/local/nvm/versions/node/v8.16.1/bin/node
npm: 6.13.3 - /usr/local/nvm/versions/node/v8.16.1/bin/npm
https://github.com/gilbarbara/react-joyride/blob/master/src/modules/dom.js
dom.js getScrollParent() lines 128 to 134
const hasScrolling = parent.scrollHeight > parent.offsetHeight;
/* istanbul ignore else */
if (!hasScrolling && !skipFix) {
parent.style.overflow = 'initial';
return scrollDoc();
}
Hello,
You can use the disableScrollParentFix to disable it.
Thank you.
So I get the fix by disabling another fix. What is the original fix intended to fix?
Can I get both fixes by not disabling the disableScrollParentFix during the tour and then disabling it at the end of the tour? Can you remove the overflow = 'initial' on skipFix?
@leantide
The scrollParentFix is intended for apps that have unintended overflow rules, so it resets it to initial. There's only one fix.
If your setup needs the custom overflow rule this library can't handle it by itself. I'd need to see the affected app to know what's is going on.
You could change the overflow rule conditionally when the tour is active and revert it back when it's over
Most helpful comment
Hello,
You can use the
disableScrollParentFixto disable it.