You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// When using EasyMDE, the original edit area HTML element is hidden, breaking HTML5 input validation.
22
22
// The workaround (https://github.com/sparksuite/simplemde-markdown-editor/issues/324) doesn't work with contenteditable, so we just show an alert.
23
-
if(!$textarea.val()){
24
-
if($textarea.is(':visible')){
25
-
$textarea.prop('required',true);
26
-
const$form=$textarea.parents('form');
27
-
$form[0]?.reportValidity();
23
+
if(!textarea.value){
24
+
if(isElemVisible(textarea)){
25
+
textarea.required=true;
26
+
constform=textarea.closest('form');
27
+
form?.reportValidity();
28
28
}else{
29
29
// The alert won't hurt users too much, because we are dropping the EasyMDE and the check only occurs in a few places.
0 commit comments