sparksuite / simplemde-markdown-editor

A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://simplemde.com
MIT License
9.88k stars 1.13k forks source link

Cursor positioning does not work on mobile #269

Open hiphigi opened 8 years ago

hiphigi commented 8 years ago

Tested on Galaxy S3, S4, and S5 (and Note 3) and iPhone 5c.

When clicking the Bold, Italics, etc. button, the *** or * is inserted respectively, but your cursor is not placed between them like it is when you're on a desktop browser.

In other words, when you click the bold button on mobile, you then have to manually move your cursor between the asterisks to create bold text.

AlanSydney commented 8 years ago

I am facing the same issue in Samsung Galaxy Note 5.

Hum4n01d commented 7 years ago

Same on iPhone 5S and 6S

Coffee2CodeNL commented 7 years ago

This is still happening, as well as having to tap space twice.

bennett-jacob commented 6 years ago

Possibly the same, on older mobile browsers (I tested on Android) the cursor doesn't stay in place when deleting (backspacing). It jumps around and the removed data pops back.

TangentFoxy commented 6 years ago

@jacobkdick Having the exact same issue on modern (latest version of Chrome) mobile browsers, has been that way for a long time.

Coffee2CodeNL commented 6 years ago

@Guard13007 this is abandonware, sadly

TangentFoxy commented 6 years ago

@iSDP Well that further supports the notion that I was thinking I need to move on and find a better solution. I was going to say as such but decided to hold my tongue in the hope of improvement.

TheCDC commented 6 years ago

I am having this issue in 2018.

This is the textarea element I'm trying to edit with SimpleMDE

<textarea name="contents" id="contents" class="form-control entry_editor" rows="15"> </textarea>

These are my script tags, which are after the textarea element.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
<script>

            <!-- Start simple MDE -->

    var simplemde = new SimpleMDE({
        element: document.getElementById("contents"),
        styleSelectedText: false,
        <!--spell checker might be the culprit of editing glitches on mobile-->
        spellChecker: false,
    });

</script>

When editing on mobile cursor placement by tapping works but typing causes the cursor to jump to a seemingly random location while copying recently typed characters and pasting them at the cursor's current location.

Text highlighted by the spellchecker becomes duplicated when tapped.

saschasommer commented 6 years ago

Had the same issue. Switching to the EasyMDE fork solved the mobile issues for me: https://github.com/Ionaru/simplemde-markdown-editor

lefuturiste commented 5 years ago

@Coffee2CodeNL What do you suggest me to use instead of simplemde to use on mobile ?