plone / mockup

A collection of client side patterns for faster and easier web development
http://plone.github.io/mockup/
BSD 3-Clause "New" or "Revised" License
49 stars 96 forks source link

required `pat-tinymce` leads to unsaveable forms. #1390

Closed petschki closed 3 months ago

petschki commented 3 months ago

Steps to reproduce:

  1. create a required schema.Text field with pat-tinymce enabled (eg. plone.app.z3cform.widgets.richtext.RichTextWidget)
  2. go to the editform and save it empty
  3. the backend validation comes back with error
  4. fill out value in tiny
  5. save button is still deactivated, because changeing the tiny value doesn't trigger pat-validation to re-validate -> you cannot save form.

This is due to the new z3cform textarea implementation which introduces the required parameter for the richtext field textarea now. In Plone 6.0 the plone.app.textfield markup ignored this parameter and only validated required in the backend.

So thats further why pat-validation deactivates the save button now if a required richtextfield has no input.

Possible solution

try to refactor pat-tinymce to save the value on blur event which would trigger pat-validation again and should fix this problem.