Closed clavaud closed 2 years ago
I've found something...
Seems to be related to :
binder.forField(trainingTrlField).bind("translations");
Where trainingTrlField is a custom field
public abstract class DefaultCustomListFieldForTranslationV2<C extends EntityTranslationV2>
extends FlexBoxLayout
implements HasValue<CustomListFieldValueChangeEventForTranslationV2<C>, Map<String, C>>,
HasLogger,
Serializable {}
And translations is : private Map<String, TrainingTrlDTO> translations = new HashMap<>();
As part of the main entity bind to the collaborative binder.
More info... The problem comes from the CustomField.
In the static initFieldObserver(field)
method, the field is seen as a Div (field = div {align: '', title: '', lang: '', translate: true, dir: '', …}
), then it'll do a result = new FieldObserver(field)
and because it has no shadowRoot, it will fail and generate an exception...
initTags(component) {
const tags = document.createElement('vaadin-user-tags');
component.shadowRoot.appendChild(tags);
...
}
In fact, the custom field was a FlexLayout (which implements HasValue). If I replaced by a Crud then it works.
Thanks @clavaud for the additional details! Seems like the custom field breaks the highlighting somehow, we're looking into it.
@clavaud I was able to replicate the broken field-highlighting on basic fields when using a custom field (notice that custom fields per se don't have field-highlighting, but of course having a custom field shouldn't break the highlighting of others).
Did you try to bump your dependencies to the newly released Vaadin 14.7.0 and also CE 3.1.1? With the new platform release I cannot replicate the issue anymore.
Dear, I'll try and let you know. Best regards. Alexandre
@clavaud / @jhapy are you still experiencing this with latest versions or can this be closed?
I'm closing this since we're not able to reproduce it with the current versions, feel free to reopen if you're still experiencing issues with this!
Describe the bug When adding a Form with CollaborationBind, at runtime, it popup an TypeError. It seems that the vaadin-field-highlighter.js is not loaded... and highlight of fields is not running...
If I put an CollaborationAvatarGroup on the page, it's displayed.
Screenshots![image](https://user-images.githubusercontent.com/29374055/132482882-8deb22d9-f3fb-45f1-972c-495a84f68fd4.png)
Versions