visual-space / visual-editor

Rich text editor for Flutter based on Delta format (Quill fork)
MIT License
283 stars 44 forks source link

Controller - Can't remove style on paragraphs that are separated by a new line #42

Closed FelixMittermeier closed 7 months ago

FelixMittermeier commented 2 years ago

First of all: thank you so much for working on a fork. The original project is super buggy and users are always complaining about the editor so I am more than happy to see progress in this :-)

A bug that always happens is for example:

Write two paragraphs (separated by a new line), select both of them (or just "select all") and apply formatting like "bold" or "italic". Then you are not able to remove the style for both paragraphs. The only way is to select each paragraph separately and then you can press the "bold" button again for example and this feels 😣

Screenshot_20220524-085819

adrian-moisa commented 2 years ago

Thank you for reporting this behaviour! I'll be inspecting the source code to figure out where's this issue coming from. Before getting into this rabbit hole I'll want to complete the general refactoring so I can have an easier time finding the issue. I'll post updates once I get started here. These days I had somewhat a slow pace of progress. I got a major deadline at the dayjob that disrupted my usual work schedule. I'll be pressing ahead for progress on the refactoring but I don't think I'll have it 80% complete sooner than 2 weeks.

kairan77 commented 2 years ago

the text selection code is in really bad shape atm, it involves message passing by field variable and triggers on callbacks, since this is not implemented with a sequential series of direct private method calls, but something like a delivery and pickup kind of thing, and unfortunately the passed message at the moment is 1: wrong and 2: only partially recorded(some important information is left undeposited downstream), this affect other aspects of the editor as well because other triggers also pick up these recorded data, there won't be a quick fix until the whole message passing mechanism is redesigned with existing bugs fixed.

adrian-moisa commented 2 years ago

Will drop you a ping once I get to this topic. I've noticed lately this behaviour myself and I thought it's a bug I added during the refactoring. But it seems it's legacy. I'll investigate, but then again, I have higher prio issues to consider first. I'll update as soon as possible.

adrian-moisa commented 7 months ago

To be continued in #29