Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Web editor not updating content after deleting a word (ctrl+backspace) #808

Closed
Sebbones opened this issue Sep 14, 2023 · 0 comments · Fixed by #833
Closed

Web editor not updating content after deleting a word (ctrl+backspace) #808

Sebbones opened this issue Sep 14, 2023 · 0 comments · Fixed by #833

Comments

@Sebbones
Copy link

Sebbones commented Sep 14, 2023

Summary

When deleting a word with ctrl+backspace in the web composer nothing happens.

Expected

Word is removed from the editor after deleting it with ctrl+backspace

Actual

After deleting a word with ctrl+backspace, the content of the editor does not get updated. Nothing happens visually.

The issue also occures in the editor example and current development release of develop.element.io

ezgif com-video-to-gif

Problem

Internally the model of the editor seems to update properly, but the visible content does not. After pressing anything but ctrl+backspace the editor content gets updated and the deleted word is also gone (expected behaviour in the first place).

I tracked a part of the problem down to platforms/web/lib/useListeners/event.ts:205 where replace_all returns undefined after ctrl+backspace and therefore the editor content does not get replaced. I was not able to dig further into the issue due to my lacking experience in rust land.

const repl = update.text_update().replace_all;
if (repl) {
    replaceEditor(
        editor,
        repl.replacement_html,
        repl.start_utf16_codeunit,
        repl.end_utf16_codeunit,
    );
    testUtilities.setEditorHtml(repl.replacement_html);
}

Related issues

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants