Skip to content

RelatedItemsFieldWidget prevents submit in Chrome #241

@szakitibi

Description

@szakitibi

A required RelationChoice field using plone.app.z3cform.widgets.relateditems.RelatedItemsFieldWidget prevents ++add++ form submit in Chrome.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Classic UI demo site https://classic.demo.plone.org/
  2. Login as manager
  3. Go to Site Setup and create a new Dexterty Type (e.g. "Test") having no behavior fields only the following XML schema:
<model xmlns:i18n="http://xml.zope.org/namespaces/i18n" xmlns:form="http://namespaces.plone.org/supermodel/form" xmlns:security="http://namespaces.plone.org/supermodel/security" xmlns:marshal="http://namespaces.plone.org/supermodel/marshal" xmlns:indexer="http://namespaces.plone.org/supermodel/indexer" xmlns:users="http://namespaces.plone.org/supermodel/users" xmlns:lingua="http://namespaces.plone.org/supermodel/lingua" xmlns:easyform="http://namespaces.plone.org/supermodel/easyform" xmlns="http://namespaces.plone.org/supermodel/schema">
  <schema>
    <field name="myfield" type="z3c.relationfield.schema.RelationChoice">
      <description/>
      <title>My Field</title>
      <portal_type>
        <element>Document</element>
      </portal_type>
      <form:widget type="plone.app.z3cform.widgets.relateditems.RelatedItemsFieldWidget"/>
    </field>
  </schema>
</model>
  1. Create a "Test" object using the ++add++test form with the test "My Field" relation field in Chrome browser

On add form load the field has the "Please fill out this field" error message

Image

It prevents form submit even after selecting a valid Document in the widget.

Image

The same behavior is not present:

  • in Firefox
  • on DX edit form in Chrome
  • in Chrome if other fields are added to the form

Used:

Expected behavior

The widget should work in Chrome browser.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions