Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-107883

HTML repeatable fields do not have a "draggable" icon

    Details

      Description

      Reproduction steps:
      1) Patch 7.2 with dxp-3, start the server, login as Admin
      2) Create a new web content structure having a repeatable Text and a repeatable HTML field:

      {
          "availableLanguageIds": [
              "en_US"
          ],
          "defaultLanguageId": "en_US",
          "fields": [
              {
                  "label": {
                      "en_US": "Text"
                  },
                  "predefinedValue": {
                      "en_US": ""
                  },
                  "style": {
                      "en_US": ""
                  },
                  "tip": {
                      "en_US": ""
                  },
                  "dataType": "string",
                  "indexType": "keyword",
                  "localizable": true,
                  "name": "Text3f6m",
                  "readOnly": false,
                  "repeatable": true,
                  "required": false,
                  "showLabel": true,
                  "type": "text"
              },
              {
                  "label": {
                      "en_US": "HTML"
                  },
                  "predefinedValue": {
                      "en_US": ""
                  },
                  "style": {
                      "en_US": ""
                  },
                  "tip": {
                      "en_US": ""
                  },
                  "dataType": "html",
                  "fieldNamespace": "ddm",
                  "indexType": "text",
                  "localizable": true,
                  "name": "HTMLi6a9",
                  "readOnly": false,
                  "repeatable": true,
                  "required": false,
                  "showLabel": true,
                  "type": "ddm-text-html"
              }
          ]
      }
      

      Save it and associate a dummy template to it
      3) Create a new Web Content from such structure
      4) Click on the plus button on each of the two fields to repeat them
      5) Observe the top-left corner of each field:
      Expected behavior: Both Text and HTML fields to have a "draggable" icon
      Actual behavior: Only the Text field has got the draggable icon. The HTML field will not have it, although it will be possible to drag and drop it
      Reproduced on 7.2.x-private @ 783c64f23ce754a4700c3216d8df717f03235194b0bbf1aef9cb3893ec9723d5
      Reproduced on master-private @ 33eca5a5e120de9a57231d269ca4ed7f6798e29e8806b2f8b0cbab9d06b32ddd
      Working as expected on 7.1.x-private @ d4a3357ea0df2ef389cc9aa591ffd771bce5116485128b2c2e3f9a7edfac18ba

      Root cause in ddm_form.js:
      'renderUI()' runs 'instance.syncLabel(instance.get('displayLocale'));'
      This will set the value of the labels and also escape it's html:

      labelNode.html(A.Escape.html(label));
      

      HTML field's structure is different, the drag icon will be placed inside the label not next to it, thus it will be removed when escaping at 'setLabel()'.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                8 weeks, 5 days ago

                Packages

                Version Package
                7.2.X
                7.3.1 CE GA2
                7.3.2 CE GA3
                Master