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

Wiki / WYSIWYG cancel button submits the edit form

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.9 M2
    • 1.7.1, 1.8 M1
    • None
    • any
    • cancel edit wiki wysiwyg form submit

    Description

      Right now the cancel button is implemented in editactions.vm like this:

      <span class="buttonwrapper">
        <input class="button" type="submit" name="formactioncancel" #if ($keyboardShortcutsEnabled)title="$msg.get("core.shortcuts.edit.cancel")"#end value="$msg.get("cancel")" onclick="cancelEdit();"/>
      </span>
      

      Notice the

      type="submit"

      . I think the cancel button shouldn't submit the edit form. The new WYSIWYG has an issue because of this. If the user manages to get into an invalid state in which the save throws and exception, he cannot cancel the editing because the edit form would still be submitted and the WYSIWYG Conversion Filter would still throw an exception.

      I tried using an anchor but the cancel button doesn't look the same.

      Attachments

        Issue Links

          Activity

            People

              sdumitriu Sergiu Dumitriu
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: