Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-12731

Copy-pasted internal links in the BO editor lose their `href` attribute and only retain `data-ametys-href`, causing unintended CSS side effects

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.9.11, 4.10.0
    • None
    • None
    • None

      When a user copies and pastes an internal link inside the BO rich-text editor, the resulting link element loses its `href` attribute. Only the `data-ametys-href` attribute is preserved.

      As a consequence, the link is matched by the following CSS rule:

      .ametys-cms-content a:not([href]):not([tabindex]):not([role="slider"]),
      .mceContentBody a:not([href]):not([tabindex]):not([role="slider"]) {
        position: relative;
        top: -160px;
        display: block;
      }

      This rule incorrectly applies to copy-pasted internal links, shifting them visually by `-160px` and breaking the layout.

            Unassigned Unassigned
            alice Alice Klockenbring
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: