WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

'open' prop does not control modal #338

@PatrickKing

Description

@PatrickKing

When using a reactjs-popup modal in a simple use case, the 'open' prop doesn't control the modal. Clicking on the modal backdrop will cause the modal to close.

      <Popup modal open = { true }>
        <span> Modal content </span>
      </Popup>

This seems like I may have missed something. Or perhaps Popup isn't a really controlled component?

Version

2.0.5

Test Case

      <Popup modal open = { true }>
        <span> Modal content </span>
      </Popup>

Expected Behavior

When clicking on the backdrop, the popup honours the value of the 'open' prop and remains open.

Actual Behavior

The popup closes, ignoring the value of the 'open' prop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions