React-joyride: Injected overflow: initial remains after tour is finished

Created on 13 Dec 2019  路  5Comments  路  Source: gilbarbara/react-joyride

馃悰 Bug Report

To Reproduce

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.

Expected behavior

Joyride does not break my scrolling container.

Environment

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

Most helpful comment

Hello,

You can use the disableScrollParentFix to disable it.

All 5 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alessapm picture alessapm  路  5Comments

snlhnk picture snlhnk  路  5Comments

shri3k picture shri3k  路  5Comments

jjordy picture jjordy  路  3Comments

zlwaterfield picture zlwaterfield  路  6Comments