<template>
  <div class="main
        ${showEditor ? 'has-editor' : ''}
        ${splitView ? 'split-view' : ''}
        ${showOutput ? 'has-output-editor' : ''}"
      if.bind="activeForm">
    <compose view="./about.html" if.bind="showEditor && activeForm === 'about'" containerless></compose>
    <compose class="form" view-model.bind="activeForm" if.bind="showEditor && activeForm !== 'about'"></compose>
    <div class="preview" textcontent.one-way="currentFormJSON" if.bind="splitView && activeForm !== 'about'"></div>
    <div class="output-editor" if.bind="showOutput">
      <textarea value.one-way="json" ref="outputEditor" rows="30"></textarea>
      <div class="actions">
        <button class="save" t="output-editor.save" click.delegate="importOutputEditor()">
          Save changes
        </button>
      </div>
    </div>
    <div class="rich-preview-wrapper" if.bind="showPreview">
      <require from="swagger-ui/swagger-ui.css"></require>
      <require from="style/swagger-ui.css"></require>
      <compose view="swagger-ui-svg.html"></compose>
      <div id="rich-preview" ref="richPreviewObj"></div>
    </div>
  </div>
</template>

<template>
  <div class="main
        ${showEditor ? 'has-editor' : ''}
        ${splitView ? 'split-view' : ''}
        ${showOutput ? 'has-output-editor' : ''}"
      if.bind="activeForm">
    <compose view="./about.html" if.bind="showEditor && activeForm === 'about'" containerless></compose>
    <template if.bind="activeForm !== 'about'">
      <compose class="form" view-model.bind="activeForm" if.bind="showEditor"></compose>
      <div class="preview" textcontent.one-way="currentFormJSON" if.bind="splitView"></div>
    </template>
    <div class="output-editor" if.bind="showOutput">
      <textarea value.one-way="json" ref="outputEditor" rows="30"></textarea>
      <div class="actions">
        <button class="save" t="output-editor.save" click.delegate="importOutputEditor()">
          Save changes
        </button>
      </div>
    </div>
    <div class="rich-preview-wrapper" if.bind="showPreview">
      <require from="swagger-ui/swagger-ui.css"></require>
      <require from="style/swagger-ui.css"></require>
      <compose view="swagger-ui-svg.html"></compose>
      <div id="rich-preview" ref="richPreviewObj"></div>
    </div>
  </div>
</template>

Fix possible error when moving between views in a certain way
Fix possible error when moving between views in a certain way
