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 a8e927e commit 3a64e6eb0223f947153a75b40b5786477d0fed8c @andrewnicols andrewnicols committed with andrewnicols Jan 28, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/yui/chooserdialogue/chooserdialogue.js
@@ -238,8 +238,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 3a64e6e

Please sign in to comment.