GithubHelp home page GithubHelp logo

Comments (8)

manosim avatar manosim commented on May 1, 2024

The same happened to me. Did you managed to fix this? Also there are 2 scrollbars when scrolling (one for the modal and one for the page). Any ideas?

dec 23 2015 23 34

from react-modal.

risonsimon avatar risonsimon commented on May 1, 2024

anyone found a solution for this? I'm having this issue as well, having multiple scrollbars.

from react-modal.

hustlzp avatar hustlzp commented on May 1, 2024

Remove this line did the trick:

https://github.com/reactjs/react-modal/blob/master/lib/components/ModalPortal.js#L187

from react-modal.

hustlzp avatar hustlzp commented on May 1, 2024

Or less hacky way:

@jonaswindey @risonsimon @ekonstantinidis

<Modal className="Modal__Bootstrap modal-dialog"
    style={styles}>
</Modal>

const styles = {
    content: {
        position: null,
        top: null,
        left: null,
        right: null,
        bottom: null,
        border: null,
        background: null,
        overflow: null,
        WebkitOverflowScrolling: null,
        borderRadius: null,
        padding: null
    }
}

from react-modal.

sibelius avatar sibelius commented on May 1, 2024

👍

from react-modal.

sibelius avatar sibelius commented on May 1, 2024

@hustlzp this do not work when you have a navbar, do you know how to fix this?

from react-modal.

claydiffrient avatar claydiffrient commented on May 1, 2024

There hasn't been much traction on this issue in almost a year. I'm assuming that this is no longer an issue. If it is, please feel free to re-open.

from react-modal.

NewDimension avatar NewDimension commented on May 1, 2024

This issue still exists. In the docs it's mentioned that className and/or overlayClassName need to be set so the respective components don't get passed default styles. Docs

In the example, they set className to "Modal__Bootstrap" which doesn't correspond to any defined style, but does the job of removing default style from the component. However, they don't set overlayClassName so the overlay gets the default style. We could set overlayClassName to "ReactModal__Overlay" but we still need to fix the CSS.

// component.js
      <Modal
          className="Modal__Bootstrap modal-dialog"
          overlayClassName="ReactModal__Overlay" // ADD THIS
           isOpen={this.state.modalIsOpen}
        >
         ...

// style.css

.ReactModal__Overlay {
  -webkit-perspective: 600;
  perspective: 600;
  opacity: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed; // ADD MISSING
  inset: 0px // ADD MISSING
}
...

from react-modal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.