wordpress-mobile / wordpress-mobile/AztecEditor-iOS

iOS 18 ,Chinese input,use toggleMark(range: NSRange, color: String?, resetColor: Bool) bug

Open
#1,411 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
669
Forks
153
Avg merge
11h 27m
Merged PRs (30d)
4

Description

Describe the bug

pod "WordPress-Aztec-iOS", ~>1.19.11
pod "WordPress-Editor-iOS", ~>1.19.11

iOS 18 and Chinese input,

I used toggleMark but found a bug. In Chinese, the color would break when input continuously.

It is certain to occur.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'empty page'
  2. Click on 'richTextView.toggleMark(range: richTextView.selectedRange, color:.green, resetColor: false)'
  3. iOS18 , Chinese input。我(停顿)是
  4. 是 has become black

Image

<p>123<mark style="background-color:rgba(0, 0, 0, 0);color:#ffff9500" class="has-inline-color">我</mark>是</p>

The display is orange, but what html gets is the absence of the mark tag

Expected behavior
getHtml is true is:

<p>123<mark style="background-color:rgba(0, 0, 0, 0);color:#ffff9500" class="has-inline-color">我是</mark></p>

Screenshots
is up

Smartphone (please complete the following information):

  • Device: iPhone 16 plus
  • OS: iOS 18
  • Browser: no
  • Version: 1.19.11

Additional context

  1. iOS 18
  2. Chinese input,
  3. use toggleMark(range: NSRange, color: String?, resetColor: Bool)
  4. Input Chinese word for word

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the toggleMark(range:color:resetColor:) entry point and reproduce the issue on iOS 18 with Chinese input, entering characters continuously. Inspect how the marked range and generated HTML change after composition pauses; done means the color remains applied and getHtml produces one mark element covering the complete input, such as “我是”.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.