When using the IPE, if you click "Cancel" at the bottom of the page instead of saving, the next time you customize, the Save/Cancel buttons will not disappear as expected when you click a Settings button for an existing pane, or the Add button to add a new pane. This could lead to the Save/Cancel button being pressed when the Add or Settings modal is still open, which is confusing and might cause unexpected results in what's saved for panes or the display.

Versions in use:

  • Drupal core 7.53
  • CTools 7.x-1.12+8-dev
  • Panels 7.x-3.8+0-dev

Setup:

  • Log in as user 1 or as an admin with full permissions.
  • Enable latest dev versions of CTools, Page Manager, Panels, and the Panels IPE.
  • Create a Page Manager page with a Panels variant; set its renderer to IPE.
  • Add some pane content to the page.

To reproduce:

  1. Browse to and reload the Page Manager page.
  2. Click the IPE Customize... button.
  3. Click the settings (gear icon) button for one of the panes.
  4. Note the settings modal appears and the IPE buttons at the bottom of the screen disappear.
  5. Close the modal.
  6. Click the IPE Cancel button.
  7. Click the IPE Customize... button again.
  8. Click the settings (gear icon) button for one of the panes.
  9. Note the settings modal appears, but the IPE buttons do not disappear.
  10. Reload the page.
  11. Click the IPE Customize... button.
  12. Click the settings (gear icon) button for one of the panes.
  13. Note the settings modal appears and the IPE buttons at the bottom of the screen disappear.

There is a JS function that switches the IPE div from display:block to display:none and back again when a modal opens/closes. If you customize after canceling, the switch doesn't happen. But if you save instead of canceling, or if you reload the page after canceling, the switch happens and everything works as expected.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cboyden created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
FileSize
1.11 KB

Here's a patch that works in my testing!

The problem was that it wasn't re-binding the "hide bar" events after restoring the IPE's old state from a cloned copy of the original DOM.

cboyden’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @dsnopek, after applying this patch the IPE buttons are disappearing when you re-customize after canceling.

DamienMcKenna’s picture

  • japerry committed 698da19 on 7.x-3.x authored by dsnopek
    Issue #2841709 by dsnopek: IPE buttons still appear when pane modal is...
japerry’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch, looks good to me. Fixed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.