Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-7993

Ckeditor doesn't restore opacity when closing mgnlLink

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.33
    • 6.2.32
    • None
    • None
    • Nucleus 34
    • 3
    • Yes

      Steps to reproduce

      1.  Create a rich text field component
      2.  Click on Link to Internal Page or Link to DAM document
      3. Close without selecting anything
      4. Check that the rich text has 0.2 opacity

      Expected results

      0.2 opacity attribute is removed from the editor

      Actual results

      The opacity attribute is only removed when a page or a DAM document is selected

      Workaround

      N/A

      Development notes

      When a page or DAM document is selected, there is a call to:

      demo.magnolia-cms.com/VAADIN/js/magnolialink/plugin.js
      function setReadOnly(editor, isReadOnly) {
          if (isReadOnly) {
              editor.element.setStyle('opacity', '0.2');
          } else {
              editor.element.removeStyle('opacity');
          }
      }
      

      And this is done through:

      demo.magnolia-cms.com/VAADIN/js/magnolialink/plugin.js
       editor.on(EVENT_SEND_MAGNOLIA_LINK, function(e) {
           deselectedCommand();
           setReadOnly(editor, false);
      [...]
      

      The problem is that hen you click on the X icon (close dialog) or at "Cancel" button, the editor.on(EVENT_CANCEL_LINK, function(e) is not being called so the opacity can't be fixed.

        Acceptance criteria

              jsarf Jaromir Sarf
              ccantalapiedra Carlos Cantalapiedra
              Nucleus
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Work Started:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 0.25d
                  0.25d