Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django cms popup window height is too big

Tags:

django-cms

I'm using DjnagoCMS 3 and I have annoying problem with all editing popup windows. It happens when page content is bigger (higher) than browser window. When I try to edit text or any cms plugins (double click on content) it shows popup window, but it's height is greather than height of monitor resolution. gray ractangle is popup window, but it's content is outside of browser window

If content length is not so big, everything is ok. For small page popup window is ok

Problem is somewhere in js/css of django cms.

like image 216
Antonio Avatar asked Jul 07 '15 23:07

Antonio


1 Answers

I had the same problem and found the solution. The problem is that this line:
https://github.com/divio/django-cms/blob/release/3.0.x/cms/static/cms/js/modules/cms.modal.js#L137 returns the content-height, not the window height, because of this:
jquery $(window).height() is returning the document height

So all you need to do to fix this is declare a doctype in your template.

like image 72
Chronial Avatar answered Sep 28 '22 18:09

Chronial