Skip to content

Commit

Permalink
MDL-39351 collapsed editor had grey bars above and below.
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Apr 26, 2013
1 parent cf5a329 commit a72e05c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ Y.extend(COLLAPSE, Y.Base, {
} else {
this.toggle_collapse(thisToggleNode, editortable, 1);
}

// When TinyMCE initialises itself, it adds a height to the table.
// Unfortuately, the height it sets is too big for when the editor is collpsed.
// Fortunately, the hight is not necessary, so we can just remove it.
// (If you re-size the editor then it will remove this style attribute itself.)
editortable.setStyle('height', '');
},

/**
Expand All @@ -105,8 +111,7 @@ Y.extend(COLLAPSE, Y.Base, {
*/
toggle_collapse : function(button, editortable, newstate) {
var toolbar = editortable.one('td.mceToolbar').ancestor('tr'),
statusbar = editortable.one('.mceStatusbar').ancestor('tr'),
editor, iframe, size;
statusbar = editortable.one('.mceStatusbar').ancestor('tr');

// Check whether we have a state already.
if (typeof newstate === 'undefined') {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ Y.extend(COLLAPSE, Y.Base, {
} else {
this.toggle_collapse(thisToggleNode, editortable, 1);
}

// When TinyMCE initialises itself, it adds a height to the table.
// Unfortuately, the height it sets is too big for when the editor is collpsed.
// Fortunately, the hight is not necessary, so we can just remove it.
// (If you re-size the editor then it will remove this style attribute itself.)
editortable.setStyle('height', '');
},

/**
Expand All @@ -105,8 +111,7 @@ Y.extend(COLLAPSE, Y.Base, {
*/
toggle_collapse : function(button, editortable, newstate) {
var toolbar = editortable.one('td.mceToolbar').ancestor('tr'),
statusbar = editortable.one('.mceStatusbar').ancestor('tr'),
editor, iframe, size;
statusbar = editortable.one('.mceStatusbar').ancestor('tr');

// Check whether we have a state already.
if (typeof newstate === 'undefined') {
Expand Down
9 changes: 7 additions & 2 deletions lib/editor/tinymce/yui/src/collapse/js/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ Y.extend(COLLAPSE, Y.Base, {
} else {
this.toggle_collapse(thisToggleNode, editortable, 1);
}

// When TinyMCE initialises itself, it adds a height to the table.
// Unfortuately, the height it sets is too big for when the editor is collpsed.
// Fortunately, the hight is not necessary, so we can just remove it.
// (If you re-size the editor then it will remove this style attribute itself.)
editortable.setStyle('height', '');
},

/**
Expand All @@ -103,8 +109,7 @@ Y.extend(COLLAPSE, Y.Base, {
*/
toggle_collapse : function(button, editortable, newstate) {
var toolbar = editortable.one('td.mceToolbar').ancestor('tr'),
statusbar = editortable.one('.mceStatusbar').ancestor('tr'),
editor, iframe, size;
statusbar = editortable.one('.mceStatusbar').ancestor('tr');

// Check whether we have a state already.
if (typeof newstate === 'undefined') {
Expand Down

0 comments on commit a72e05c

Please sign in to comment.