Plugin Directory

Changeset 3673748


Ignore:
Timestamp:
08/31/2026 09:21:57 AM (8 weeks ago)
Author:
megamenu
Message:

Fix: Theme editor - saving could submit stale/empty content for CodeMirror-backed fields (e.g. Pro's toggle bar HTML block) if saved before the field's own change handler had run

Location:
megamenu/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • megamenu/trunk/js/admin/theme-editor.js

    r3544252 r3673748  
    735735        $(".theme_result_message").remove();
    736736
     737        // Flush every CodeMirror instance in the form (custom CSS, and any
     738        // companion-plugin textareas such as Pro's toggle bar HTML block) back
     739        // into its textarea before serializing — CodeMirror doesn't keep the
     740        // underlying textarea's value in sync on every keystroke, so without
     741        // this a save triggered before an individual field's own blur/change
     742        // handler runs submits stale (often empty) content for that field.
     743        $form.find("textarea").each(function () {
     744            window.megamenuCodeEditor.save(this);
     745        });
     746
    737747        $.ajax({
    738748            url:  ajaxurl,
  • megamenu/trunk/readme.txt

    r3666812 r3673748  
    138138* Fix: WPML compatibility - menu item depth detection could fail on PHP 8 when a synced translation's parent ID was missing, breaking Mega Menu grid layouts for affected items
    139139* Fix: Menu item modal - lower z-index so third-party builders opened from within it (e.g. SiteOrigin Page Builder's "Layout Builder" widget) render above it instead of hidden underneath
     140* Fix: Theme editor - saving could submit stale/empty content for CodeMirror-backed fields (e.g. Pro's toggle bar HTML block) if saved before the field's own change handler had run
    140141
    141142= 3.10.6 =
Note: See TracChangeset for help on using the changeset viewer.