Closed DieterHolvoet closed 3 years ago
Thanks @DieterHolvoet for this!
It's a way to cover the issue. But I'm annoyed that a scroll placed here could hide the actions buttons (save and cancel).
I have a different approach to this problem to suggest.
Right now an empty div
is created when the element form is inserted, and this specific div
prevent the styles of the parent to apply. It could work if this div
has a height of 100% but it has no style or class.
So I think it will be better if we avoid to create an empty div
in the script:
diff --git a/assets/js/app.js b/assets/js/app.js
index 93ea492..da05688 100644
--- a/assets/js/app.js
+++ b/assets/js/app.js
@@ -409,12 +409,8 @@ global.MonsieurBizRichEditorManager = class {
}
drawEditForm(formHtml, uiElement) {
- let form = document.createElement('div');
- form.innerHTML = formHtml;
-
- let formContainer = this.editPanel.dialog.querySelector('.js-uie-content');
- formContainer.innerHTML = '';
- formContainer.append(form);
+ this.editPanel.dialog.querySelector('.js-uie-content').innerHTML = formHtml;
+ let form = this.editPanel.dialog;
this.wysiwyg.load(form);
this.initUiCollectionForm(form);
With that, the scroll is applied to the form and not to the entire panel. What do you think about this?
Great, that seems to work as well! You know the codebase better than I do :)
Thank you @DieterHolvoet ! 🎉 and @Guirec :)
Fixes #99.