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

Plugin modal window height #3465

Closed
quiqueporta opened this issue Sep 25, 2014 · 8 comments
Closed

Plugin modal window height #3465

quiqueporta opened this issue Sep 25, 2014 · 8 comments

Comments

@quiqueporta
Copy link

The height of the plugins modal window is not calculated correctly into the cms.modal.js.
I need to replace this line

var screenHeight = $(window).height();

with this

var screenHeight = window.innerHeight;

https://github.com/divio/django-cms/blob/develop/cms/static/cms/js/modules/cms.modal.js#L131

@misli
Copy link

misli commented Sep 25, 2014

I have the same experience. $(window).height() gives size of the whole document. It makes the modal window unusably large with all the relevant content outside of the screen.

@m05quit0
Copy link

It depends of html layout markup. Setting css properties width and height to 100% for html element fix problem for me.

@stevenewey
Copy link

I had this issue a few weeks ago and posted to the mailing list before discovering the solution. It's an issue with jQuery and the document type...

Some investigation uncovered that $(window).height() was returning the document height instead of the window height. This happens when there's no doctype declared on the page. A quick <!doctype html> and it was fixed!

@yakky yakky modified the milestones: 3.0.X, 3.0.7 Nov 5, 2014
@FinalAngel
Copy link
Member

also related to: #2523

this is correct, a doctype NEEDS to be declared.

@FinalAngel
Copy link
Member

jQuery's $(window).height() is sensitive to doctype. Try <!doctype html>

Don’t use Quirks mode! jQuery has never supported Quirks mode and we do not perform any testing in Quirks. This can affect values like $("window").height(), and the jQuery 1.8 Quirks mode results did change in order to support some modern browser features. The majority of problem cases we’ve seen are from developers that wanted to be in Standards mode but had an invalid doctype or extraneous markup before their tag. When in doubt, use the simple and short <!doctype html>.

@FinalAngel
Copy link
Member

@yakky can be closed #wontfix on my side

@yakky
Copy link
Member

yakky commented Nov 26, 2014

Thanks!

@yakky yakky closed this as completed Nov 26, 2014
dominiqueroux pushed a commit to ungleich/dynamicweb that referenced this issue Sep 20, 2015
see: django-cms/django-cms#3465

Signed-off-by: rscnt <rascnt@gmail.com>
@chris-rose-one
Copy link

I added to my template and it worked for a moment but then it didn't.
@m05quit0 setting html css height and width to 100% has done the trick

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

No branches or pull requests

7 participants