3 * Paragraphs actions JS code for paragraphs actions button.
6 (function ($, Drupal) {
11 * Process paragraph_actions elements.
13 * @type {Drupal~behavior}
15 * @prop {Drupal~behaviorAttach} attach
16 * Attaches paragraphsActions behaviors.
18 Drupal.behaviors.paragraphsActions = {
19 attach: function (context, settings) {
20 var $actionsElement = $(context).find('.paragraphs-dropdown').once('paragraphs-dropdown');
21 // Attach event handlers to toggle button.
22 $actionsElement.each(function () {
24 var $toggle = $this.find('.paragraphs-dropdown-toggle');
26 $toggle.on('click', function (e) {
28 $this.toggleClass('open');
31 $toggle.on('focusout', function (e) {
32 $this.removeClass('open');