Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-31245

Editing link in paragraph containing more lines ends up with JS error

    XMLWordPrintable

    Details

      Description

      When a paragraph contains more than one line, creating/editing a link generates a JavaScript error.

      Steps to reproduce:
      1. Create a new article "test".
      2. Edit one of its RichText fields e.g. "Intro".
      3. Type for example: "test1 [Shift+Enter] test2".
      4. Highlight "test1" chunk of text and open link toolbar.
      5. Type some random link and confirm.

      Result:
      The JS error occurs:

      backend.js:6 TypeError: Cannot read property 'target' of undefined
          at test (ez-image-link.js:60)
          at Object.<anonymous> (alloy-editor-no-react-min.js:1045)
          at Array.some (<anonymous>)
          at Object._getCurrentSelection (alloy-editor-no-react-min.js:1045)
          at Object.render (alloy-editor-no-react-min.js:1045)
          at ce (react-dom.production.min.js:98)
          at qg (react-dom.production.min.js:97)
          at hi (react-dom.production.min.js:104)
          at Qg (react-dom.production.min.js:144)
          at Rg (react-dom.production.min.js:145)
      

      after that, there is no toolbar present while editing content in RTE.

      Expected result:
      Link is added without JS error and editing content is still possible.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            konrad.oboza@ez.no Konrad Oboza
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: