Skip to content

Conversation

@NormB
Copy link

@NormB NormB commented Jan 17, 2026

Summary

Fixes certificate grid action buttons (Issue/Renew, Re-Import, Run Automations, Revoke, Reset) not working correctly with the new UIBootgrid/Tabulator system in OPNsense 25.7.x.

Problems Fixed

1. Buttons not firing (no popup appearing)

  • Clicks on action buttons were being intercepted by Tabulator's row selection
  • Fix: Added e.stopPropagation() and e.preventDefault() to all command handlers

2. Multiple clicks required to close dialogs

  • The loaded.rs.jquery.bootgrid event fires on every grid reload
  • Handlers attached inside this callback would stack up (N reloads = N handlers)
  • Each click would open multiple dialogs stacked on top of each other
  • Fix: Moved custom command handlers outside the callback and used namespaced events with .off() before .on() to ensure single handler

Changes

  • Custom command handlers (toggle, sign, revoke, removekey, automation, import) now bound at document level with namespaced events (click.acme.toggle, etc.)
  • Added e.stopPropagation() and e.preventDefault() to prevent Tabulator interference
  • Used .off('click').on() pattern for handlers that must remain inside the callback

Testing

  • Verified all action buttons show confirmation dialogs with single click
  • Verified dialogs close with single click on Yes/Cancel
  • Verified actions execute correctly after confirmation

Fixes #5123

Co-Authored-By: Claude Opus 4.5 [email protected]

…Bootgrid

Fixed two issues with the certificate grid action buttons not working
correctly with the new UIBootgrid/Tabulator system in OPNsense 25.7.x:

1. Buttons not firing (no popup appearing):
   - Added e.stopPropagation() and e.preventDefault() to all command
     handlers to prevent Tabulator's row selection from intercepting
     button clicks
   - Changed custom command handlers (toggle, sign, revoke, removekey,
     automation, import) to use document-level event delegation with
     namespaced events

2. Multiple clicks required to close dialogs:
   - Moved custom command handlers OUTSIDE the loaded.rs.jquery.bootgrid
     callback to prevent duplicate handlers being attached on each grid
     reload
   - Used .off() before .on() with namespaced events (e.g.,
     "click.acme.import") to ensure only one handler exists
   - Added .off('click').on() pattern for handlers that must remain
     inside the callback (edit, copy, delete, add, deleteSelected)

The loaded.rs.jquery.bootgrid event fires on every grid reload, so
handlers attached inside it would stack up, causing multiple dialogs
to open on a single click.

Fixes opnsense#5123

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@NormB NormB force-pushed the bugfix/acme-revoke-button branch from e39b335 to c36e0a6 Compare January 18, 2026 01:15
@fraenki fraenki self-assigned this Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

os-acme-client: Certificate - Multiple "Commands" in the list grid do not seem to be firing/working

2 participants