Skip to content

Ctrl+z working when editor is not focused #3281

@userNotFoundByDefault

Description

@userNotFoundByDefault

Describe the bug

Even when the editor option 'useCommandShortcut' is set to false, clicking outside of the editor and pressing Ctrl+Z will undo the last step. Redo is working as expected (pressing Ctrl+Shift+Z outside of the editor does nothing).

To Reproduce

Steps to reproduce the behavior:

  1. Go to the examples site of the TUI-Editor and open example 3: https://nhn.github.io/tui.editor/latest/tutorial-example03-editor-with-wysiwyg-mode
  2. Click into the editor and type something
  3. Click outside of the editor (into the empty area below) . Editor loses focus.
  4. Editor does an undo-step.

It is important to note that the issues does not always happen (for me it happens all the time but a colleague is having the issue randomly), so it might be necessary to repeat the steps 2-4. I tried to find out if there is a certain condition for when it always happens but could not figure it out yet.

Expected behavior

Pressing Ctrl+Z does nothing when the editor is not focused (just like Ctrl+Shift+Z)

Screenshots

None

Desktop (please complete the following information):

  • OS: KDE neon 6.2
  • Browser: Firefox
  • Version: 132.0 (64-bit)

Smartphone (please complete the following information):

  • Not tested

Additional context

I saw that there is another issues open about the Ctrl+Z feature (#3266). The reason for this bug might be related to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions