Skip to content

[Bug]: Editor injects redundant <span style="font-size: inherit;"> wrappers when switching input language mid-text, causing content bloat #2644

Description

@SMSdesign

Operating system

Windows 11

Publii version

0.47.8

Post editor

WYSIWYG editor

Bug description

When typing in the WYSIWYG post editor and switching the OS/keyboard input language in the middle of a paragraph (e.g. Latin ↔ Cyrillic), the editor progressively wraps the newly typed text in empty-purpose tags. These accumulate with every language switch, resulting in deeply nested spans with no visual effect but significant HTML/DOM bloat in the saved post content.

Steps to reproduce

  1. Create/open a post in the Publii WYSIWYG editor.
  2. Start typing a sentence in one language (e.g. English).
  3. Switch the system input language (e.g. to Ukrainian/Russian) without leaving the current paragraph, and continue typing.
  4. Switch back and forth a few more times while continuing to type in the same paragraph.
  5. Open "Source code" view for that block/post.

The underlying HTML stays clean — plain text nodes inside the paragraph, with no extra wrappers, since no font-size or other style was actually changed by the user.

Actual Result

The HTML accumulates multiple nested (sometimes also <strong style="line-height: inherit;") elements around the newly typed runs of text — one or more per language switch. On longer posts edited across multiple languages, this can add dozens of empty spans

Relevant log output

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions