Revert "Issue #2149933 by effulgentsia: Improve Edit module JS to use .find(...) instead of .is(':has(...)')."
Wrong commit credit.
This reverts commit af335ce5c7
.
8.0.x
parent
af335ce5c7
commit
b8288cf90a
|
@ -23,9 +23,8 @@ Drupal.edit.editors.plain_text = Drupal.edit.EditorView.extend({
|
|||
|
||||
// Store the original value of this field. Necessary for reverting changes.
|
||||
var $textElement;
|
||||
var $fieldItems = this.$el.find('.field-item');
|
||||
if ($fieldItems.length) {
|
||||
$textElement = this.$textElement = $fieldItems.eq(0);
|
||||
if (this.$el.is(':has(.field-item)')) {
|
||||
$textElement = this.$textElement = this.$el.find('.field-item:first');
|
||||
}
|
||||
else {
|
||||
$textElement = this.$textElement = this.$el;
|
||||
|
|
Loading…
Reference in New Issue