Open Bug 1407852 Opened 7 years ago Updated 4 months ago

Create new undo action on each pressed enter space or tab

Categories

(Core :: DOM: Editor, defect)

52 Branch
defect

Tracking

()

People

(Reporter: yanp.bugz, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce:

Enter some text: several words and several paragraphs, press ^Z


Actual results:

Everuthing disappeared


Expected results:

^Z (undo) must remove last entered word or paragraph since it's convinient across many programs (eny text editor, any word processor)
That's a "feature" of the Core::Editor that provides editing for Thunderbird and Firefox. Just type text into the comment box here and you can observer the same behaviour in FF.
Component: Message Compose Window → Editor
Product: Thunderbird → Core
I've looked at the source code. Maybe to solve this issue we should handle space/enter in EditorBase::HandleKeyPressEvent and create new transaction.
Priority: -- → P3
Severity: normal → S3

Wow, Chrome undoes per character. However, I don't like the behavior because it requires a lot of transactions and doing too many times to undo everything. On the otherhand, indeed, Firefox bundles too many things into a transaction. Yeah, I agree with the report. On the other hand, there are a lot of languages which do not separate words with specific character. So I have no simple idea to fix this properly for all users...

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Priority: P3 → --
Hardware: Unspecified → All

Ah, but IME transactions are treated as unmergeable. Therefore, East Asian languages can be split to words automatically.

Notepad and Wordpad on Win11 behave similar to Firefox. Word ends transaction at inserting paragraph or automatically replacing a word, but keep merging transactions when typing multiple words in same line.

You need to log in before you can comment on or make changes to this bug.