Skip to content
Snippets Groups Projects
Commit a5bff94d authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2149933 by nod_: Improve Edit module JS to use .find(...) instead of .is(':has(...)').

parent b8288cf9
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -23,8 +23,9 @@ Drupal.edit.editors.plain_text = Drupal.edit.EditorView.extend({
// Store the original value of this field. Necessary for reverting changes.
var $textElement;
if (this.$el.is(':has(.field-item)')) {
$textElement = this.$textElement = this.$el.find('.field-item:first');
var $fieldItems = this.$el.find('.field-item');
if ($fieldItems.length) {
$textElement = this.$textElement = $fieldItems.eq(0);
}
else {
$textElement = this.$textElement = this.$el;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment