Skip to content

Fix: Prevent collapse of Complex Fields when adding entries#16

Merged
daimpad merged 1 commit into
mainfrom
claude/fix-data-prep-errors-kJYpl
May 15, 2026
Merged

Fix: Prevent collapse of Complex Fields when adding entries#16
daimpad merged 1 commit into
mainfrom
claude/fix-data-prep-errors-kJYpl

Conversation

@daimpad
Copy link
Copy Markdown
Owner

@daimpad daimpad commented May 15, 2026

Summary

When clicking "Add Entry" in the Datenbereitstellung (Data Preparation) tab's Distribution Complex Field, the entire field was unexpectedly collapsing. This was caused by event bubbling triggering Carbon Fields' collapse handler.

Solution

Added odw-complex-fix.js which uses stopPropagation() on the "Add Entry" button click to prevent the event from bubbling to parent elements that might trigger collapse handlers.

Testing

  • Navigate to Dataset edit form
  • Go to Tab 3 (Datenbereitstellung)
  • Click "Add Entry" button
  • The Distribution field should stay expanded (no unexpected collapse)

Files Changed

  • assets/js/odw-complex-fix.js (new) — Prevents event bubbling on Complex Field action buttons
  • includes/class-admin.php — Enqueues the new fix script

Generated by Claude Code

When clicking 'Add Entry' in the Datenbereitstellung (Data Preparation) tab,
the entire Complex Field was unexpectedly collapsing. This was due to event
bubbling causing the collapse toggle to be triggered.

Added odw-complex-fix.js which uses stopPropagation() to prevent the 'Add Entry'
button click from bubbling up to parent elements that might trigger collapse handlers.

https://claude.ai/code/session_01JB1xUQM892bVZ4Yv3MZjvq
@daimpad daimpad merged commit a72a99e into main May 15, 2026
10 checks passed
@daimpad daimpad deleted the claude/fix-data-prep-errors-kJYpl branch May 15, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants