Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent modal to go out of window #15

Open
soner8 opened this issue Mar 25, 2019 · 4 comments
Open

Prevent modal to go out of window #15

soner8 opened this issue Mar 25, 2019 · 4 comments

Comments

@soner8
Copy link

soner8 commented Mar 25, 2019

I actually can't prevent modal to go out of window, do you have any idea how I can make it ?

@wwan5803
Copy link
Owner

you can add some css class so you will be able to drag from all borders of the modal.
.flexible-modal-drag-area-left{
background: rgba(22, 22, 333, 0.2);
width: 50px;
position:absolute;
left:0;
bottom:0;
cursor:move;
}

.flexible-modal-drag-area-right{
background: rgba(22, 22, 333, 0.2);
height: 50px;
position:absolute;
right:0;
bottom:0;
cursor:move;
}

.flexible-modal-drag-area-bottom{
background: rgba(22, 22, 333, 0.2);
height: 50px;
position:absolute;
right:0;
bottom:0;
cursor:move;
}

@BhavikModi
Copy link

@wwan5803 this CSS is not working, do you have any other option to prevent modal to go out of browser screen?

@aramy-amirth
Copy link

any updates on this one? anyway to prevent the modal from being dragged out of window?

@Bonnev
Copy link

Bonnev commented Aug 25, 2022

Not a solution but if you haven't disabled the keystrokes with disableKeystroke=true, you can use the keyboard arrows to bring it back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants