Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.39k stars 316 forks source link

writing over initial placeholder text without deleting it and error when submitting said text #155

Open EmmanuelPerezP opened 4 years ago

EmmanuelPerezP commented 4 years ago

Describe the bug hi i was using this fork and bumped into this problem i would appreciate a fix or some guide in what am i doing wrong, thanks alot, the bug is this:

when i write over the initial placeholder text it doesnt deletes it and writes "on top" of the text and error when submitting said text because the text submitted is empty see screenshot

To Reproduce Steps to reproduce the behavior:

  1. Go to a form with a textarea with easymde on chrome or firefox on android
  2. Touch the textarea and write sometext
  3. Submit form
  4. See error while writing the text or while submitting the form with a restriction to not allow empty text

Expected behavior The placeholder text should be deleted, and the submitted text should not be empty server side

Screenshots easymde screenshot of the error

Version information

Additional context the form doesnt allow empty text

Ionaru commented 4 years ago

I think this is a codemirror issue, EasyMDE does nothing with the placeholder except pass it to the codemirror editor.

I've noticed that tapping on the entered text does remove the placeholder.

Ionaru commented 4 years ago

https://github.com/codemirror/CodeMirror/issues/5244

A-312 commented 4 years ago

I think this is a codemirror issue, EasyMDE does nothing with the placeholder except pass it to the codemirror editor.

I've noticed that tapping on the entered text does remove the placeholder.

In fact, I think is a keyboard/mobile browser issue^^' Because the keyboard doesn't send the input before we press space.