WYSIWYG editor field on builder disappears sometimes? #157
Replies: 2 comments
-
|
I've also attempted to use AI to potentially debug the issue, so the jotted notes here might be wrong and you should take this with a grain of salt. Root Cause: Vueform core's v-show="visible" on ElementLayout The style="display: none;" is applied by vueform core, not by your system and not by trix. Here's the chain:
File: node_modules/@vueform/vueform/themes/blank/templates/ElementLayout.vue:2 The vfb-preview-element-container class is added to this same container div by the builder (via its class merge system). So the v-show="visible" directive is what controls the display: none.
File: node_modules/@vueform/vueform/dist/core.mjs:22350 Since the "Hopes" field has no conditions, available should always be true. That leaves two suspects:
The builder uses steps (pages). During form loading, the steps system assigns elements to their pages and sets active accordingly. The trix-editor is a web component with async initialization (setTimeout(fn, 0) for This creates a race condition:
The warning "This browser does not support the [disabled] attribute for trix-editor elements" comes from trix's fallback class (ro) at the bottom of the trix source. The EditorWrapper passes disabled as an attribute to
It's a vueform issue where:
Debugging suggestion To confirm, open browser devtools when the bug reproduces, select the hidden element, and in the Vue devtools check:
|
Beta Was this translation helpful? Give feedback.
-
|
There hasn't been any issues around this reported by other so it is either something environmental or happens in a weird / specific edge case. If you manage to put together a reproducible example I'm happy to have a look at it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m not exactly sure of the best way to replicate this in StackBlitz. I haven’t been able to make it disappear there, but in production, very rarely, the WYSIWYG field on the builder form will sometimes disappear. When inspecting the HTML, it appears that the input div has a display: none style applied.
<div class="vfb-preview-element-container vfb-preview-element-container-md col-span-12 form-text-type" data-path="Hopes" tabindex="-1" aria-label="Hopes" aria-describedby="Hopes__aria-description" style="display: none;"><!-- There's more content here but the rest of it doesn't matter i believe--></div>I've also send this message to the discord help channel, but it seems this is the preferred place for issues.
Beta Was this translation helpful? Give feedback.
All reactions