Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-264

WYSIWYG editor incompatible with toolbar buttons

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Minor
    • Resolution: Non-Issue
    • Affects Version/s: 1.5.0, 1.5.1, 2.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      New JSF-based webapps. Does not affect existing tools such as syllabus and profile.

      Description

      The current JSF WYSIWYG editor is incompatible with the current JSF toolbar button implementation. This does not affect button-bar buttons (which display along the bottom of the screen), it only affects toolbar buttons (which display across the top of the screen).

      See the attached screenshot.

      To reproduce:
      1. Enter text into the WYSIWYG editor.
      2. Click on a toolbar button (a button across the top of the webapp)

      Symptom:
      The entered text will be lost.

      Why this is happening:
      Under the covers, the WYSIWYG editor uses the form's onsubmit() function to marshall the formatted text in preparation to submit it to the server. The current toolbar implementation bypasses the onsubmit() function by calling form.submit() directly (and the browsers don't automatically call onsubmit() if JavaScript calls form.submit()).

      Possible solutions:

      • Modify the toolbar JSF renderer to not call form.submit() directly.
      • Modify the WYSIWYG editor to somehow not rely on form.onsubmit().
      • Don't allow the WYSIWYG editor on the same page as a toolbar button, and modify the JSF WYSIWYG component to check for this problem and throw an exception that the developer will notice.

      Mitigating factors:
      None of the current Sakai tools use the WYSIWYG editor on the same page as a toolbar button. If they are not on the same page, there is no problem. So perhaps a note of this could be made.

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                janderse Jon Andersen (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration