Skip to content
Snippets Groups Projects

Issue #3391546: Replace deprecated core/jquery.once for Drupal 10 support

6 files
+ 23
25
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -3,7 +3,7 @@
* Adds JS functionality to the Private Message form.
*/
(function ($, Drupal, drupalSettings) {
(function ($, Drupal, drupalSettings, once) {
'use strict';
@@ -32,7 +32,7 @@
* @param {Object} context The context.
*/
function submitButtonListener(context) {
$(context).parent().find('.private-message-add-form textarea').once('private-message-form-submit-button-listener').each(function () {
$(once('private-message-form-submit-button-listener', '.private-message-add-form textarea', context)).each(function () {
$(this).keyup(submitKeyPress);
});
}
@@ -47,4 +47,4 @@
}
};
}(jQuery, Drupal, drupalSettings));
}(jQuery, Drupal, drupalSettings, once));
Loading