superlistapp / super_editor

A Flutter toolkit for building document editors and readers
https://superlist.com/SuperEditor/
MIT License
1.68k stars 246 forks source link

[Web] Text Rendered Twice when selected #1467

Open brian-superlist opened 1 year ago

brian-superlist commented 1 year ago

When you select text on Web, text is duplicated and rendered twice. Sometimes over top of the current text, in other cases in the wrong position.

Reproduction Steps

  1. Run the example app with MS Edge or Chromium
  2. Run main super_editor demo or a super_textfield
  3. Select some Text
  4. See Duplication

Expected: Text is selected. Works correctly on MacOS. Actual: Text is selected and duplicate text is also displayed in a selected state

Screenshot 2023-09-24 183137 Screenshot 2023-09-24 183130 Screenshot 2023-09-24 183124 Screenshot 2023-09-24 183114
miguelcmedeiros commented 1 year ago

Cc @matthew-carroll @angelosilvestre

angelosilvestre commented 1 year ago

@miguelcmedeiros @brian-superlist Is there anything else needed to trigger this issue?

I tested on Windows with Edge using both canvas kit and html, main and stable, and I couldn't reproduce the issue.

brian-superlist commented 1 year ago

@angelosilvestre Sorry, was a bit under the weather. I'm actually not sure how it's happening... It's even happening on MacOS now for me as well. Sometimes it also affects Flutter's Material TextField, but now I can only reproduce on our app using super_editor stable 🤔

I'm not quite sure under what conditions it's happening. This exact same branch had no problems 1hr hour ago. I relaunch Chrome (no update) and now it has this problem again.

On my Windows and Linux machines, it stopped happening on Chrome after I updated both of them and is now only happening on Microsoft Edge, which appears to be a bit behind Google Chrome / Chromium.

I can't quite figure out what exact conditions reproduce the issue. I'd like to keep it open for now since I've seen it several times I'd like to keep it open in case users run into it and report it as well.

Screenshot 2023-09-28 at 8 49 39 PM