Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
a5bff94d
Commit
a5bff94d
authored
Dec 10, 2013
by
webchick
Browse files
Issue
#2149933
by nod_: Improve Edit module JS to use .find(...) instead of .is(':has(...)').
parent
b8288cf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/edit/js/editors/plainTextEditor.js
View file @
a5bff94d
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment