From 46d6cb739d1f43482a1a512b0a86782a2ae9d8d6 Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Tue, 13 May 2014 11:37:29 +0200
Subject: [PATCH] Don't set the dialog content height to a zero or negative
 value

---
 core/js/jquery.ocdialog.js | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js
index b91f3ed765..66d9b12db3 100644
--- a/core/js/jquery.ocdialog.js
+++ b/core/js/jquery.ocdialog.js
@@ -160,10 +160,16 @@
 			}
 			this.parent = this.$dialog.parent().length > 0 ? this.$dialog.parent() : $('body');
 			content_height = Math.min(content_height, this.parent.height()-20);
-			this.element.css({
-				height: content_height + 'px',
-				width: this.$dialog.innerWidth()-20 + 'px'
-			});
+			if (content_height> 0) {
+				this.element.css({
+					height: content_height + 'px',
+					width: this.$dialog.innerWidth()-20 + 'px'
+				});
+			} else {
+				this.element.css({
+					width : this.$dialog.innerWidth() - 20 + 'px'
+				});
+			}
 		},
 		_createOverlay: function() {
 			if(!this.options.modal) {
-- 
GitLab