Using ckeditor_tabber with accordion

Created on 19 May 2023, over 1 year ago

Problem/Motivation

Accordions is not able to expand/collaps inside a tabber (ckeditor_tabber v2.0.0)

Steps to reproduce

Create accordions inside a tab

Proposed resolution

it works if you add "ckeditor_tabber/semantic_tabs" to dependencies in ckeditor_accordion.libraries.yml
This make the tabber javascript code run first, and then accordion code.

I know that not everyone is using tabber, so maybe not the best solution.

The alternative might be to change ckeditor_tabber to move element around instead of copying html. This make removes listenerEvents, which causes accordion click events to be removed.

ckeditor_accordion.libraries.yml :

accordion.frontend:
  js:
    js/accordion.frontend.js: { preprocess: false, minified: true }
  css:
    theme:
      css/accordion.frontend.css: { }
  dependencies:
    - core/drupal
    - core/drupalSettings
    - core/once
+    - ckeditor_tabber/semantic_tabs
Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇩🇰Denmark klausdk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024