Fixed critical UI closure issue in image section editing: 1. **Root Issue**: The `hideEditor()` method was not removing editor containers from DOM, causing editing UI to remain visible after button clicks 2. **hideEditor() Enhancement**: - Now properly removes both `.ui-edit-editor-container` and `.ui-edit-image-editor-container` from DOM - Ensures complete UI cleanup when editors are closed - Handles cases where no containers exist gracefully 3. **Button Behavior Fixes**: - **Accept**: Saves alt text changes, accepts changes, and closes UI completely - **Cancel**: Discards changes and closes UI completely - **Reset**: Resets to original content, updates display, and closes UI completely - All buttons now provide immediate visual feedback with complete UI closure 4. **Reset Button Logic Fix**: - Removed reopening of image editor after reset (was keeping UI open) - Now properly closes UI and shows reset content in display mode - Provides better user experience with clear completion feedback Added comprehensive test suite with 7 tests covering DOM manipulation and UI closure. All image editing buttons now behave consistently with proper UI cleanup. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
9.6 KiB
9.6 KiB