Skip to content

DOCX: a conversion result that arrives during an IME composition is dropped #28

Open

Description

@pierreneter

A docx.edit result that arrives while an IME composition is active (Telex, CJK input) is dropped whole and never applied later.

Reproduction:

  1. Open a document for editing and toggle a list on a paragraph (or change its style).
  2. Start a composition before the response arrives, so that it is still active when the response lands.
  3. The model keeps lst undefined, no marker shows, and the toolbar button stays unpressed. busy drops to false with no notification.
  4. It only heals when that same paragraph is edited again. With a toggle over several paragraphs, the others stay unconverted.

Reproduced with a DocxEditor probe while reviewing #22. From reading the code, list renumbering markers for other paragraphs in the same result are lost the same way.

Cause, on main at 43b28d6: applyResult returns before applying anything while the input is composing, and nothing keeps the result:

private applyResult(res: EditResult, sent: Set<Paragraph>): boolean {
if (this.input.isComposing) return false

Expected: a result that cannot be applied during a composition is applied when the composition ends, and the formatting state is republished then.

Possible direction: keep the pending result (with its sent set) and apply it on compositionend, instead of returning false. A test that holds a response until a composition is open would cover it.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions