Skip to content

Commit

Permalink
move field label invisibility outside of $nextTick
Browse files Browse the repository at this point in the history
this should fix Visual glitch when adding new sets #2
  • Loading branch information
eminos committed Nov 7, 2023
1 parent 0be221a commit f4731a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/build/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"src": "resources/css/statamic-tabs.css"
},
"resources/js/statamic-tabs.js": {
"file": "assets/statamic-tabs-df3c0a40.js",
"file": "assets/statamic-tabs-89ca38d1.js",
"isEntry": true,
"src": "resources/js/statamic-tabs.js"
}
Expand Down
18 changes: 8 additions & 10 deletions resources/js/compontents/TabFieldtype.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,15 @@ export default {
}
})
this.$nextTick(() => {
// Hide the label from the main tab
if (this.isMainTab) {
this.$el.closest('.publish-field').querySelector('label').classList.add('super-invisible')
}
// Hide the label from the main tab
if (this.isMainTab) {
this.$el.closest('.publish-field').querySelector('label').classList.add('super-invisible')
}
// Make the now empty publish field invisible without touching the display property, so that we can track it with a MutationObserver
if (! this.isMainTab) {
this.$el.closest('.publish-field').classList.add('super-invisible')
}
})
// Make the now empty publish field invisible without touching the display property, so that we can track it with a MutationObserver
if (!this.isMainTab) {
this.$el.closest('.publish-field').classList.add('super-invisible')
}
this.$nextTick(() => {
if (this.isMainTab) {
Expand Down

0 comments on commit f4731a6

Please sign in to comment.