react-awesome-modal icon indicating copy to clipboard operation
react-awesome-modal copied to clipboard

CSS position fixed issue

Open RRolfes opened this issue 6 years ago • 4 comments

If the modal is within a div that is styled position: fixed; (e.g. within a fixed nav bar), the input and Link elements on the page (not in the nav bar) become unreachable. This may be because height and width of the modal are set to 100% of the page, with no way to alter them. Thus, the react-awesome-modal cannot be placed inside of a div that has its position fixed to the page.

New to using this npm, so it may be user error!

RRolfes avatar Mar 13 '18 04:03 RRolfes

i encounter this issue. any update for it :)

JulianSuringa avatar Apr 19 '18 13:04 JulianSuringa

same issue any solution?

Way-U-Need avatar Jun 07 '19 06:06 Way-U-Need

Not that I am aware of. It was awhile ago, but I think I built my own modal and removed the package.

RRolfes avatar Jun 07 '19 08:06 RRolfes

This is probably way too late, but in case someone else needs this; we ended up wrapping the entire modal-component to conditionally render on the visibility prop. That way we didn't get the fixed div overshadowing the entire app. Like this:

{showModal ? (
        <Modal
          visible={showModal}
          closeModal={ ... }
          onConfirmClick={...}
        />
      ) : null}

ghost avatar Mar 10 '20 11:03 ghost