Compatability with Gin sticky headers

Created on 19 June 2024, 9 days ago
Updated 27 June 2024, about 20 hours ago

Problem/Motivation

Recently Gin added sticky headers to node edit forms. This has caused an issue where the publish content modal does not publish the page anymore, as it cannot trigger the submit button.

Steps to reproduce

  1. Install moderated_content_bulk_publish and gin rc11
  2. add an editorial worklow to a content type
  3. create a page and try to publish it
  4. select yes in the publish this item modal

Expected result

Node edit form submits and page is published.

Actual result

Modal will dismiss but nothing will happen.

Proposed resolution

We could add the following to moderated_content_bulk_publish.js to support the sticky form submit buttons.
, .gin-sticky-form-actions #edit-submit
So it would be

click: function click(e) {
   confirmationDialog_publish.close();
   $(".node-form #edit-submit, .node-layout-builder-form  #edit-submit, .gin-sticky-form-actions #edit-submit").unbind('click.moderated_content_bulk_publish');
   $(".node-form #edit-submit, .node-layout-builder-form  #edit-submit, .gin-sticky-form-actions #edit-submit").trigger('click.moderated_content_bulk_publish');
   $(e.target).remove();
   return true;
},

Alternatively, as we know we are on a node edit form, we could just target #edit-submit.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom andybroomfield

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024