Closed Juknum closed 2 years ago
In GitLab by @tleb on Oct 15, 2019, 10:41
added 1 commit
In GitLab by @tleb on Oct 16, 2019, 12:19
added 1 commit
In GitLab by @sli on Oct 17, 2019, 14:48
merged
In GitLab by @sli on Oct 17, 2019, 14:48
mentioned in commit 6d0eba6bcf5f3a57f51897a4badb45c5a78172da
In GitLab by @tleb on Oct 15, 2019, 10:27
Merges rework-front -> master
Some context: EasyMDE (the Markdown editor used) works by hiding the wanted textarea and add its fancy window besides it. This means that the standard handling of the required attribute is broken. The goal of this MR is to mimic the standard browser behaviour using JS (when JS is not activated, the standard textarea works as expected of course).
I copied what Firefox 69 does: once the submit button has been pressed, an input which does not respect its validation requirements is highlighted in red (updated when the content changes).
It looks a bit weird in Chromium 77 (I assume its the same in Chrome) but it works as intended: show the user he needs to input something into the Markdown editor. Browser detection could be done but it doesn't bring much I think.
REVIEW TODO: check the widget works as expected on a page such as
/com/weekmail/new_article
. Check that the preview works as expected in the editor (either preview button or sliced in two button).