Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295466

<textarea>s using Text Editor always fail HTML5 validation when "required" is added via #states

$
0
0

Problem/Motivation

There was an issue: #1954968: Required CKEditor fields always fail HTML5 validation
"An invalid form control with name='{name}' is not focusable" JS error is thrown when a textarea has "required" attribute, but is not visible.

This was fixed in CKEditor: https://dev.ckeditor.com/ticket/8031
Now CKEditor removes the "required" attribute from textarea during initialization.

But the problem still exist if the "required" attribute is added via #states.

Steps to reproduce

Add states to node title and body field via form alter to make body field required when the node title is filled in.

Proposed resolution

Make this more reliable to handle if a field is changed to required via #states that the field gets marked as required and editors are notified when HTML5 validation fails,so that editors know what the problem is and can act on it.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295466

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>