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

SelectionPreserver does not work properly with selection contents deletion on IE

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7.1, 1.8 M1
    • Component/s: WYSIWYG Editor
    • Labels:
      None
    • Environment:
      IE
    • Tests:
      Unit
    • Similar issues:

      Description

      If the selection contents are completely deleted after a SelectionPreserver.store(), then, in certain situations, the actual selection (caret) can slide in one of the spans that mark the start and end of the selection preserver. If content is added at this point, it is added in these elements and, upon, SelectionPreserver.restore() will be deleted with the markers.

      One example is the replacement of an image with the InsertHTML command with selection preserving: when the selection is on the image and the image element is deleted, the caret slides in the preserver's marker spans, causing the new html (the one to be inserted) to be added in the span and deleted upon selection restore.

      This behaviour was noticed on IE7, and it does not reproduce on FF.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mflorea Marius Dumitru Florea
                Reporter:
                lucaa Anca Luca
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: