MDL-66721 core_chooser: height correction for chooser modal
authorBas Brands <bas@moodle.com>
Tue, 3 Dec 2019 15:18:04 +0000 (16:18 +0100)
committerBas Brands <bas@moodle.com>
Mon, 6 Jan 2020 09:07:16 +0000 (10:07 +0100)
lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-debug.js
lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-min.js
lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue.js
lib/yui/src/chooserdialogue/js/chooserdialogue.js

index 8c64593..4ccb899 100644 (file)
Binary files a/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-debug.js and b/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-debug.js differ
index b07b223..9acc9d6 100644 (file)
Binary files a/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-min.js and b/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-min.js differ
index 8c64593..4ccb899 100644 (file)
Binary files a/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue.js and b/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue.js differ
index 020d7b0..a2df1f7 100644 (file)
@@ -244,10 +244,10 @@ Y.extend(CHOOSERDIALOGUE, Y.Base, {
             }
         }
 
-        // Take off 15px top and bottom for borders, plus 40px each for the title and button area before setting the
-        // new max-height
+        // Take off 15px top and bottom for borders, plus 69px for the title and 57px for the
+        // button area before setting the new max-height.
         totalheight = newheight;
-        newheight = newheight - (15 + 15 + 40 + 40);
+        newheight = newheight - (69 + 57 + 15 + 15);
         dialogue.setStyle('maxHeight', newheight + 'px');
 
         var dialogueheight = bb.getStyle('height');
@@ -260,6 +260,8 @@ Y.extend(CHOOSERDIALOGUE, Y.Base, {
         if (dialogueheight < this.get('baseheight')) {
             dialogueheight = this.get('baseheight');
             dialogue.setStyle('height', dialogueheight + 'px');
+        } else {
+            dialogue.setStyle('height', 'auto');
         }
 
         this.panel.centerDialogue();