Skip to content

Commit 7f2ff1a

Browse files
committed
fix(textareafield): compatibility with GLPI 9.5.10
1 parent da9d8dc commit 7f2ff1a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

js/scripts.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -928,10 +928,12 @@ var plugin_formcreator = new function() {
928928
var questionId = questionKey;
929929
questionId = parseInt(questionKey.replace('formcreator_field_', ''));
930930
if (!isNaN(questionId)) {
931-
// Workaround issue with tinymce input which may be 0px height
932-
$('#form-group-field-' + questionKey + ' iframe')
933-
.attr('data-mce-style', 'width: 100%; height: 148px; display: block;')
934-
.attr('style', 'width: 100%; height: 148px; display: block;');
931+
if (tinymce.majorVersion < 5) {
932+
// Workaround issue with tinymce input which may be 0px height
933+
$('#form-group-field-' + questionKey + ' iframe')
934+
.attr('data-mce-style', 'width: 100%; height: 148px; display: block;')
935+
.attr('style', 'width: 100%; height: 148px; display: block;');
936+
}
935937
if (questionToShow[questionKey]) {
936938
$('#plugin_formcreator_form.plugin_formcreator_form [data-itemtype = "PluginFormcreatorQuestion"][data-id="' + questionKey + '"]').removeAttr('hidden', '');
937939
} else {

0 commit comments

Comments
 (0)