Giter Club home page Giter Club logo

Comments (2)

tbleckert avatar tbleckert commented on August 16, 2024

Short answer: Yes, it should close when you click outside.

Long answer: The popup container is supposed to cover the whole area of a page with the actual popup floating inside of it. The outside click handler is attached to the container. The main reason why the container should cover the whole page is because you can have a transparent background on it that acts as an overlay. You can make a transparent overlay by setting "noOverlay" to true.

We should definitely add documentation regarding styling of the component. In the next release we will also add inline css as a feature to make things easier and more in line with the "react way" of styling components.

Hope that answers your question and thanks for using it. Let me know if you find any other bugs or maybe have som feature requests. And as always, PRs are always welcome and appreciated.

from react-popup.

GRardB avatar GRardB commented on August 16, 2024

Gotcha, that makes sense. Thanks! It appears that the problem I have is that there are no styles on the container, so it has a height/width of 0.

Either way, I think that for my use case, I'll need to go a different route. I'm using the component purely for popovers (like the example on the demo page), and having the container cover the whole page prevents users from doing other things, such as selecting text or clicking links; they would need to first click outside of the popup in order to do anything else.

I've been meaning to try to contribute to more OSS, so if I have something I'd like to add to this, I'll be sure to do it 😁

from react-popup.

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.