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

Use the same Range implementation for all browsers

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 1.8 M2, 1.7.2
    • 1.7.1
    • WYSIWYG Editor
    • None
    • any
    • range selection
    • Unit

    Description

      Currently (1.7.1) the editor uses different Range implementations for different browsers:

      • for FF3 we wrap the native Range
      • for FF2 we extend the FF3 implementation in order fix some bugs in the native Range
      • for IE we try to adapt the native text/control Range to the W3C specification

      The problem with this approach is that all these implementations are not 100% equivalent. Since each operation can introduce a small difference, a sequence of Range method calls can generate completely different results on different browsers.

      The solution is to have a single Range implementation for all browsers. The Selection implementation for each browser will try to apply the cross-browser range to their best. The advantage is that we can have differences only when the range is computed from the selection and when it is added back to the selection.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: