Commit ea618577 authored by Matt Glaman's avatar Matt Glaman Committed by Adam G-H
Browse files

Issue #3292304 by mglaman: Replace usage of core/jquery.once for core/once

parent 3184cd06
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ drupal.entity_embed.dialog:
  dependencies:
    - core/drupal
    - core/jquery
    - core/once

caption:
  version: VERSION
+3 −3
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
 * embed dialog.
 */

(function ($, Drupal) {
(function ($, Drupal, once) {

  "use strict";

@@ -27,7 +27,7 @@
   */
  Drupal.behaviors.entityEmbedDialog = {
    attach: function (context, settings) {
      $('body').once('js-entity-embed-dialog').on('entityBrowserIFrameAppend', function () {
      $(once('js-entity-embed-dialog', 'body')).on('entityBrowserIFrameAppend', function () {
        $('.entity-select-dialog').trigger('resize');
        // Hide the next button, the click is triggered by Drupal.entityEmbedDialog.selectionCompleted.
        $('#drupal-modal').parent().find('.js-button-next').addClass('visually-hidden');
@@ -52,4 +52,4 @@
    }
  };

})(jQuery, Drupal);
})(jQuery, Drupal, once);