Skip to content

Commit

Permalink
MDL-37566 AJAX Only set max-height for chooser dialogues
Browse files Browse the repository at this point in the history
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
Andrew Robert Nicols authored and Andrew Robert Nicols committed Feb 1, 2013
1 parent 5e3412d commit ce8cde8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/yui/chooserdialogue/chooserdialogue.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ce8cde8

Please sign in to comment.