Skip to content

Document - Undo, Redo Fixes #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
adrian-moisa opened this issue Jun 15, 2022 · 0 comments
Open

Document - Undo, Redo Fixes #50

adrian-moisa opened this issue Jun 15, 2022 · 0 comments
Labels

Comments

@adrian-moisa
Copy link
Collaborator

adrian-moisa commented Jun 15, 2022

VE Document - Not all changes respond to the undo hotkey #50

  • Pressing Cmd+Z wont unde the addition of checkboxes in text. However it restored bold styles. Many such situations occur. Not sure yet what is the root cause. Needs investigation.
  • Undo does not restore styling changes, only character content edits are restored. Apparently the undo feature works for styles only by pressing the undo redo buttons. Not from the keyboard. Only changing characters works from keyboard. That is sign of some bad architecture. The behaviours should be matching at all times. This is issue that I've inherited from Flutter Quill when forking it.
Screen.Recording.2022-05-20.at.12.43.13.mov

VE Document - Cursor gets moved around when undoing and redoing

VE Document - Keyboard hotkey loses styling when restoring text #52

  • Toolbar undo button and Command Z act differently. Keyboard hotkey loses styling when restoring text. The behaviours should be identical.
  • Some sample code if useful:
      RawKeyboardListener(
        focusNode: FocusNode(),
        onKey: (event) {
          if (event.data.isControlPressed && event.character == 'b') {
            if (_controller!
                .getSelectionStyle()
                .attributes
                .keys
                .contains('bold')) {
              _controller!.formatSelection(
                AttributeM.clone(AttributeM.bold, null),
              );
            } else {
              _controller!.formatSelection(AttributeM.bold);
            }
          }
        },
        child: _editor(),
      ),
@adrian-moisa adrian-moisa removed the High label Nov 5, 2022
@adrian-moisa adrian-moisa changed the title Not all changes respond to the undo hotkey Document - Not all changes respond to the undo hotkey Nov 5, 2022
@adrian-moisa adrian-moisa removed the 0.2 label Jan 23, 2024
@adrian-moisa adrian-moisa changed the title Document - Not all changes respond to the undo hotkey Document - Undo, Redo Fixes Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants