Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25887

The macro edit button from the BlockNote toolbar edits the macro call from before undo / redo

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 18.10.0
    • 18.6.0-rc-1
    • BlockNote
    • None
    • Integration
    • Unknown

    Description

      Steps to reproduce:

      1. Edit a page in-place with the BlockNote editor and insert a macro, e.g. a success message with the title "bar".
      2. Select the macro with a single click and click the Edit button from the toolbar.
      3. Change the macro title to "baz" and submit.
      4. Without changing the selection, undo (Ctrl+Z).
      5. Click again the Edit button from the toolbar.

      Expected results: the macro edit modal shows the macro call restored by the undo (title "bar"), and submitting it updates that macro call.

      Actual results: the macro edit modal shows the macro call from before the undo (title "baz"), and submitting it writes back the undone changes. The same happens on redo (Ctrl+Y). Changing the selection (e.g. clicking the macro again) fixes the problem, which is why double clicking the macro works fine.

      The toolbar Edit button reads the selected macro call when it is rendered, and the toolbar is not rendered again when the selected block is modified without changing the selection.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: