Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-1795

Cannot set property 'length' of null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • None
    • None
    • TrackChanges

    Description

      Problem

      The editor is unusable after this error happens.

      To reproduce

      1. open segment for editing (segment without target content)
      2. close the segment
      3. leave the task and open the task again
      4. open the same segment for editing

      Stack:

      rangy-core.js:3042 Uncaught TypeError: Cannot set property 'length' of null
       at updateEmptySelection (rangy-core.js:3042)
       at WrappedSelection.selProto.removeAllRanges (rangy-core.js:3261)
       at WrappedSelection.selProto.setSingleRange (rangy-core.js:3648)
       at constructor.setSingleRangeInEditor (UtilSelection.js?_dc=1568388177581:127)
       at constructor.positionCaretAtEnd (UtilSelection.js?_dc=1568388177581:284)
       at constructor.handleAfterSetValueAndMarkup (Editor.js?_dc=1568388176875:617)
       at constructor.fire (ext-all-debug.js:20731)
       at constructor.dispatch (ext-all-debug.js:57952)
       at constructor.callParent (ext-all-debug.js:12493)
       at constructor.dispatch (ext-all-debug.js:58196)

      Solution

      Reset the internal range selection on task close/open

      Attachments

        Activity

          People

            aleksandar Aleksandar Mitrev
            aleksandar Aleksandar Mitrev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: