Ionaru / Ionaru/easy-markdown-editor

Blocks form submission with no feedback.

Open
#536 0 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
JavaScript
Stars
3.1k
Forks
363
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Blocks form submission with no feedback.

**To Reproduce**
1. Add a markdownfield.models.MarkdownField to a Django model
2. forget to set blank=True (which permits submission of blank fields on Django ModelForms)
3. Try and submit a form with that field on it

The Submit button does nothing. Submits nothing. And displays nothing on the page. Took me a while to trace it to this editor (just added in his iteration). As I only had the minified JS to look at not diagnosed further but can see it binds to the submit event and I presume blocks submission if blank fields are not permitted and probably wants to notify the user but there may be some configuration error, or a bug maybe, whatever, that is preventing any visible indication.

My fix was just to set blank=True as submitting nothing is perfectly valid in our context. But it took a while to trace so I thought I'd drop a note (that said, this looks like a super popular little editor and has hundreds of pen issues and I see a v3.0 rewrite is underway, so issues like this one may just not be worth anyone's time to more than triage if that (and hope it goes away in 3.0 ;-).

**Expected behavior**
I'd expect it it to pop up a little message saying what's happened. Other Django fields do that ... or not block submission. But this could well relate to how the markdownfield package integrates with the editor and initialises it. i.e. it might be a downstream issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.