Giter VIP home page Giter VIP logo

Comments (7)

ever-dev avatar ever-dev commented on August 18, 2024 1

Just found a solution and it's working well.

const [visible, setVisible] = useState(false);
  return (
    <Popover
      content={() => (
        <div css={styles.popup} onClick={e => e.stopPropagation()}>
          {visible && (
            <Content
              closePopup={() => {
                setVisible(false);
                onVisibleChange && onVisibleChange(false);
              }}
            />
          )}
        </div>
      )}
      isOpen={visible}
      onClickOutside={() => {
        hideOnOutsideClick && setVisible(false);
        onVisibleChange && onVisibleChange(false);
      }}
      padding={padding}
      position={position}
      align={align}
    >
      <div
        onClick={() => {
          onVisibleChange && onVisibleChange(!visible);
          setVisible(!visible);
        }}
      >
        {children}
      </div>
    </Popover>
  );

from react-tiny-popover.

acfasj avatar acfasj commented on August 18, 2024

came across the same problem

from react-tiny-popover.

jmbastidas avatar jmbastidas commented on August 18, 2024

Same thing, same problem, see: #61
Maybe supporting zero transition duration will fix it.
When transitionDuration was introduced we started to experience this problem.

The problem:
Sometimes window.setTimeout does not work, something cancels it, so remove is sometimes not called.

@alexkatz would you be able to fix this problem or at least support zero transition duration?

from react-tiny-popover.

roeibit avatar roeibit commented on August 18, 2024

same issue here.

from react-tiny-popover.

FlorianWendelborn avatar FlorianWendelborn commented on August 18, 2024

Seems to only happen when scrolling at the same time.

from react-tiny-popover.

ever-dev avatar ever-dev commented on August 18, 2024

Same issue here

from react-tiny-popover.

alexkatz avatar alexkatz commented on August 18, 2024

Should be fixed in v6. Here's that same codesandbox updated to v6.0.1.

https://codesandbox.io/s/react-tiny-popover-demo-forked-v7h0n?file=/src/index.js

Closing for now. However, please let me know if you still experience this issue. Thanks guys!

from react-tiny-popover.

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.