Skip to content

Reposition the modal on size changed. #72

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

Closed
wants to merge 7 commits into from

Conversation

jojosati
Copy link

I'm not sure whether I've missed some of your features.
Now I'm trying to do my own auto reposition, hope it may be useful.

  1. Initial modal (with collapsed part) .
    bootstrap-modal-reposition-01
  2. Default modal. When expand the collapsed part, the modal is overflown without reposition (the browser window is also overflown).
    bootstrap-modal-reposition-03
  3. Modal with '.modal-reposition'. When expand the collapsed part, now the modal is fitted into the browser window with no outer overflow.
    bootstrap-modal-reposition-02

height and  maxHeight option can pass a callback function or string
'auto',
for recalculating height/maxHeight of modal-body  everytime window's
size changed.
Modal with  '.modal-reposition' class will listen to any input 'change'
event to check modal-size changed and fire 'resize.modal'.
The "change" event may be triggered by input, select and textarea
element within modal.
Otherwise required writing a custom script to trigger when ajax loading
complete or trigger every specific interval .
@jojosati
Copy link
Author

@jojosati
Copy link
Author

I've just add the "Fit, Flow & Reposition" demo using my wip branch at last section of page.
http://jojosati.github.com/bootstrap-modal/demo.html

view demo
fit-flow-reposition-01

click me
fit-flow-reposition-02

fit or flow
fit-flow-reposition-03

@skelz0r
Copy link

skelz0r commented Mar 3, 2013

+1

@jordandh
Copy link

jordandh commented Mar 7, 2013

This looks great. I really like how it works. I would definitely make use of it.

@jschr
Copy link
Owner

jschr commented Mar 7, 2013

Sorry for the late response, this looks promising. I might be missing something but I don't see any code for the fit/flow options in the merge request. Do you need to resubmit the pull request with your latest changes?

@jojosati
Copy link
Author

jojosati commented Mar 7, 2013

pull request #87

@jschr jschr mentioned this pull request Mar 8, 2013
@jojosati
Copy link
Author

jojosati commented Mar 8, 2013

close this repo, see #88

@jojosati jojosati closed this Mar 8, 2013
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

Successfully merging this pull request may close these issues.

4 participants