Permalink
Browse files

MDL-37566 AJAX Only set max-height for chooser dialogues

If we set height as well as max-height then there is a potential for
whitespace to be shown at the bottom of the list of choices.

This commit stops removing the height option so that we only rely upon
max-height for dialogue heigh calculation.
  • Loading branch information...
1 parent 5e3412d commit ce8cde8b45b42210d9e7f7e7d04f26e30f83a04b @andrewnicols andrewnicols committed with andrewnicols Jan 28, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/yui/chooserdialogue/chooserdialogue.js
@@ -237,8 +237,7 @@ YUI.add('moodle-core-chooserdialogue', function(Y) {
// new max-height
var totalheight = newheight;
newheight = newheight - (15 + 15 + 40 + 40);
- dialogue.setStyle('max-height', newheight + 'px');
- dialogue.setStyle('height', newheight + 'px');
+ dialogue.setStyle('maxHeight', newheight + 'px');
// Re-calculate the location now that we've changed the size
var dialoguetop = Math.max(12, ((winheight - totalheight) / 2)) + offsettop;

0 comments on commit ce8cde8

Please sign in to comment.