|
6 | 6 | -->
|
7 | 7 |
|
8 | 8 | <div class="pagebuilder-content-type pagebuilder-tabs children-min-height" attr="data.main.attributes" ko-style="data.main.style" css="data.main.css" event="{ mouseover: onMouseOver, mouseout: onMouseOut }, mouseoverBubble: false">
|
9 |
| - <render args="getOptions().template" /> |
| 9 | + <div visible="focusedTab() === null"> |
| 10 | + <render args="getOptions().template" /> |
| 11 | + </div> |
10 | 12 | <div class="tabs-container" afterRender="function (element) { onContainerRender.call($data, element); }">
|
11 | 13 | <ul role="tablist" class="tabs-navigation" each="parent.getChildren()" attr="data.navigation.attributes" ko-style="data.navigation.style" css="data.navigation.css" data-bind="sortableChildren: getSortableOptions()">
|
12 | 14 | <with args="preview">
|
13 |
| - <li role="tab" class="tab-header" css="{focused: parent.parent.preview.focusedTab() === $index()}" click="function (context, event) { parent.parent.preview.onTabClick($index(), event); }" ko-style="parent.parent.preview.getTabHeaderStyles()"> |
| 15 | + <li role="tab" class="tab-header" |
| 16 | + css="{focused: parent.parent.preview.focusedTab() === $index()}" |
| 17 | + click="function (context, event) { parent.parent.preview.onTabClick($index(), event); }" |
| 18 | + ko-style="parent.parent.preview.getTabHeaderStyles()" |
| 19 | + event="{ focusin: function () { parent.parent.preview.setFocusedTab($index(), true) }, focusout: function () { window.getSelection().removeAllRanges(); parent.parent.preview.setFocusedTab(null); } }"> |
14 | 20 | <a href="#no-tab" class="tab-title focus-options" attr="{ href: '#' + parent.id }">
|
15 | 21 | <render args="getOptions().template" />
|
16 | 22 | <span class="tab-drag-handle" css="{disabled: parent.parent.children().length <= 1}"></span>
|
17 |
| - <span class="tab-title tab-name" data-tab-title="true" data-bind="liveEdit: { field: 'tab_name', placeholder: $t('...') }, hasFocusNoScroll: parent.parent.preview.focusedTab() === $index()" event="{ focusin: function () { parent.parent.preview.setFocusedTab($index(), true) }, focusout: function () { window.getSelection().removeAllRanges(); parent.parent.preview.setFocusedTab(null); } }"></span> |
| 23 | + <span class="tab-title tab-name" data-tab-title="true" data-bind="liveEdit: { field: 'tab_name', placeholder: $t('...') }, hasFocusNoScroll: parent.parent.preview.focusedTab() === $index()"></span> |
18 | 24 | </a>
|
19 | 25 | </li>
|
20 | 26 | </with>
|
|
0 commit comments