Skip to content

Commit

Permalink
Fixed #7774 - A question disappears when Title Location: Bottom and t…
Browse files Browse the repository at this point in the history
…he question is collapsed
  • Loading branch information
tsv2013 committed Feb 2, 2024
1 parent 5f6f733 commit 945a0fe
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 29 deletions.
7 changes: 6 additions & 1 deletion src/knockout/templates/question.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@
<!-- /ko -->
<!-- ko component: { name: question.survey.getQuestionContentWrapperComponentName(question), params: { componentData: question.survey.getElementWrapperComponentData(question), templateData: { name: 'survey-question-content', data: question } } } -->
<!-- /ko -->
<!-- ko if: question.hasTitleOnBottom -->
<!--ko template: { name: 'survey-question-title', data: question } -->
<!-- /ko -->
<!-- /ko -->
<!-- ko if: question.showErrorsBelowQuestion -->
<!-- ko template: { name: 'survey-question-errors', data: question } -->
<!-- /ko -->
<!-- /ko -->
</script>
</div>
</script>
52 changes: 24 additions & 28 deletions src/knockout/templates/questioncontent.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
<script type="text/html" id="survey-question-content">
<div data-bind="visible: !question.isCollapsed, css: question.cssContent, event: {focusin: question.focusIn }" role="presentation">
<!-- ko if: question.showErrorOnTop -->
<!-- ko template: { name: 'survey-question-errors', data: question } -->
<!-- /ko -->
<!-- ko if: question.showErrorOnTop -->
<!-- ko template: { name: 'survey-question-errors', data: question } -->
<!-- /ko -->
<!-- ko if: question.isDefaultRendering() -->
<!-- ko template: { name: question.koTemplateName(), data: question, afterRender: question.koQuestionAfterRender } -->
<!-- /ko -->
<!-- /ko -->
<!-- ko if: question.isDefaultRendering() -->
<!-- ko template: { name: question.koTemplateName(), data: question, afterRender: question.koQuestionAfterRender } -->
<!-- /ko -->
<!-- ko ifnot: question.isDefaultRendering() -->
<!-- ko component: { name: getComponentName(), params: { question: question } } -->
<!-- /ko -->
<!-- /ko -->
<!-- ko ifnot: question.isDefaultRendering() -->
<!-- ko component: { name: getComponentName(), params: { question: question } } -->
<!-- /ko -->
<!-- ko if: question.hasComment -->
<div data-bind="css: question.getCommentAreaCss()">
<div>
<!-- ko template: { name: 'survey-string', data: question.locCommentText } -->
<!-- /ko -->
</div>
<!-- ko template: { name: 'survey-comment', data: {'question': question, 'visible': true } } -->
<!-- /ko -->
<!-- ko if: question.hasComment -->
<div data-bind="css: question.getCommentAreaCss()">
<div>
<!-- ko template: { name: 'survey-string', data: question.locCommentText } -->
<!-- /ko -->
</div>
<!-- ko template: { name: 'survey-comment', data: {'question': question, 'visible': true } } -->
<!-- /ko -->
<!-- ko if: question.showErrorOnBottom -->
<!-- ko template: { name: 'survey-question-errors', data: question } -->
<!-- /ko -->
<!-- /ko -->
<!-- ko if: question.hasDescriptionUnderInput -->
<div data-bind="css: cssClasses.descriptionUnderInput">
<!-- ko template: { name: 'survey-string', data: locDescription } -->
<!-- /ko -->
</div>
</div>
<!-- /ko -->
<!-- ko if: question.showErrorOnBottom -->
<!-- ko template: { name: 'survey-question-errors', data: question } -->
<!-- /ko -->
<!-- ko if: question.hasTitleOnBottom -->
<!--ko template: { name: 'survey-question-title', data: question } -->
<!-- /ko -->
<!-- /ko -->
<!-- ko if: question.hasDescriptionUnderInput -->
<div data-bind="css: cssClasses.descriptionUnderInput">
<!-- ko template: { name: 'survey-string', data: locDescription } -->
<!-- /ko -->
</div>
<!-- /ko -->
</div>
</script>

0 comments on commit 945a0fe

Please sign in to comment.