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
- Switched to plain JavaScript
- Tested the wiki creation form functionality and it works as before
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
// 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(isVisible(textarea)){
25
+
textarea.setAttribute('required','true');
26
+
constform=textarea.closest('form');
27
+
form?.reportValidity();
28
28
}else{
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