Skip to content

[Bug] Cursor dislocates when pressing Backspace/Delete during IME composition #4956

Closed

Description

@Zengzzhao

Description

When an IME composition is active (e.g. typing pinyin and deleting pre-commit candidate characters), pressing Backspace or Delete triggers the editor's own backspaceHandler / deleteHandler instead of letting the key event reach the IME. This mutates the document against a stale this.text and dislocates the cursor.

PixPin_2026-07-17_16-11-46.mp4

Steps to Reproduce

  1. Place the cursor inside the HTML block's content (e.g. within the HTML block's closing tag text).
  2. Activate the IME and start typing (type pinyin so candidate characters are shown but not yet committed).
  3. While the composition is still active, press Backspace (or Delete) to delete a character in the composition.

Expected Behavior

The Backspace/Delete key should be handled by the IME to delete the in-composition text.
The cursor and document structure remain stable.

Actual Behavior

The cursor jumps / dislocates and the block content is corrupted.

Screenshots / Logs

PixPin_2026-07-17_16-11-46.mp4

Operating System

macOS

MarkText Version

v0.19.1

OS Version

macOS 26.4 (25E246)

Reproducibility

  • I can reliably reproduce this issue

Activity

  1. ZJRui commented on Jul 19, 2026

    @ZJRui

    #2347
    Is your current image upload function working properly?

    Image Pressing Ctrl+V still fails to automatically upload images. I have no idea what the development team is working on.

    In feedback such as Issue #2347, some users reported that when using GitHub as the default uploader, dragging local images works for uploads, but screenshots pasted directly from the clipboard sometimes fail to upload.

  2. Zengzzhao commented on Jul 19, 2026

    @Zengzzhao
    ContributorAuthor

    Yes, the Ctrl+V (paste) feature for uploading images is working correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions