Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Fix panel max height for older browsers #139

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/panels/PanelBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default {
setMaxHeight() {
// Don't play the transition for this case as the loading should feel 'instant'
if (this.expandedBool) {
this.$refs.panel.style.maxHeight = 'max-content';
this.$refs.panel.style.maxHeight = 'none';
return;
}

Expand All @@ -132,7 +132,7 @@ export default {
set our own transition end handlers here for the initial loading of the content.
*/
const onExpandDone = () => {
this.$refs.panel.style.maxHeight = 'max-content';
this.$refs.panel.style.maxHeight = 'none';
this.$refs.panel.removeEventListener('transitionend', onExpandDone);
};

Expand All @@ -147,7 +147,7 @@ export default {
el.style.maxHeight = `${el.scrollHeight}px`;
},
afterExpand(el) {
el.style.maxHeight = 'max-content';
el.style.maxHeight = 'none';
},
beforeCollapse(el) {
el.style.maxHeight = `${el.scrollHeight}px`;
Expand Down