Closed vnglst closed 7 years ago
@vnglst: Yep. The positioning of the element has nothing to do with the library, though: it's all about the CSS you yourself use.
Thanks for the quick repley @davidtheclark!
I'm trying to position the Modal relative to it's parent (the button) but it seems to me that the component creates a new parent div (id="react-aria-modal-dialog") that's positioned over the screen. Relative positioning is then calculated relative to that div and not to the parent button... but maybe I'm doing something wrong.
I'm trying to recreate this simple example using the React-Aria-Modal component instead of the popup span:
https://www.w3schools.com/code/tryit.asp?filename=FE5XZ2MOBV11
Am I missing something here? Thanks in advance for you help!
Or should I be using https://github.com/davidtheclark/react-aria-menubutton instead?
Oh @vnglst, my mistake: I misread and thought this was the react-aria-menubutton
repo!
Yeah, I think you should give this library a try 👍 . I don't think the ARIA attributes for a modal are appropriate for the use-case you've depicted above.
That's completely understandable, since that would be the component to use. Giving it a try right now, works great. Relative positioning is no issue there! Thanks!
I'm trying to create a popup modal with a positioning relative to the button that's activating it, similar to the popup you see on Github, when you click on your profile picture.
Is that possible with react-aria-modal?