| Línea 58... |
Línea 58... |
| 58 |
describedByIds = describedBy.split(" ");
|
58 |
describedByIds = describedBy.split(" ");
|
| 59 |
}
|
59 |
}
|
| 60 |
// Find the the feedback container in the aria-describedby attribute.
|
60 |
// Find the the feedback container in the aria-describedby attribute.
|
| 61 |
const feedbackIndex = describedByIds.indexOf(feedbackId);
|
61 |
const feedbackIndex = describedByIds.indexOf(feedbackId);
|
| Línea -... |
Línea 62... |
| - |
|
62 |
|
| 62 |
|
63 |
if (element.tagName === 'TEXTAREA') {
|
| 63 |
// Sometimes (atto) we have a hidden textarea backed by a real contenteditable div.
|
64 |
// Check if the textarea is backed by a contenteditable div.
|
| - |
|
65 |
const contentEditable = parent.find('[contenteditable]');
|
| - |
|
66 |
if (contentEditable.length > 0) {
|
| 64 |
if (($(element).prop("tagName") == 'TEXTAREA') && parent.find('[contenteditable]').length > 0) {
|
67 |
// Use the contenteditable div as the target element.
|
| - |
|
68 |
element = contentEditable[0];
|
| - |
|
69 |
} else {
|
| - |
|
70 |
// Use the TinyMCE iframe as the target element if it exists.
|
| - |
|
71 |
element = document.getElementById(`${element.id}_ifr`) || element;
|
| 65 |
element = parent.find('[contenteditable]');
|
72 |
}
|
| - |
|
73 |
}
|
| 66 |
}
|
74 |
|
| 67 |
if (msg !== '') {
|
75 |
if (msg !== '') {
|
| 68 |
parent.addClass('has-danger');
|
76 |
parent.addClass('has-danger');
|
| 69 |
parent.data('client-validation-error', true);
|
77 |
parent.data('client-validation-error', true);
|
| 70 |
$(element).addClass('is-invalid');
|
78 |
$(element).addClass('is-invalid');
|