Skip to content

Commit

Permalink
fix(textareafield): tinymce may be 0px height
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Jul 3, 2020
1 parent 2d219e2 commit 3f1c262
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/scripts.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,10 @@ function formcreatorShowFields(form) {
questionId = parseInt(questionKey.replace('formcreator_field_', ''));
if (!isNaN(questionId)) {
if (questionToShow[questionKey]) {
// Workaround issue with tinymce input which may be 0px height
$('#form-group-field-' + questionKey + ' iframe')
.attr('data-mce-style', 'width: 100%; height: 148px; display: block;')
.attr('style', 'width: 100%; height: 148px; display: block;');
$('#form-group-field-' + questionKey).removeAttr('hidden');
i++;
$('#form-group-field-' + questionKey).removeClass('line' + (i+1) % 2);
Expand Down

0 comments on commit 3f1c262

Please sign in to comment.