diff --git a/js/webform.element.other.js b/js/webform.element.other.js index 62d81fff..7efc68f5 100644 --- a/js/webform.element.other.js +++ b/js/webform.element.other.js @@ -23,6 +23,11 @@ var showEffect = (effect === false) ? 'show' : 'slideDown'; if (show) { + // Get details wrapper that is not open. + var $details = $($element).parents('details:not([open])'); + // Open details wrapper so the the other element will render correctly. + $details.attr('open', 'open'); + // Limit the other inputs width to the parent's container. $element.width($element.parent().width()); // Display the element. @@ -39,6 +44,9 @@ $element.parent().find('.CodeMirror').each(function (index, $element) { $element.CodeMirror.refresh(); }); + + // Now, close details. + $details.removeAttr('open'); } else { // Hide the element.