diff --git a/options/options.js b/options/options.js index 7e9ad0f..945d533 100644 --- a/options/options.js +++ b/options/options.js @@ -788,7 +788,10 @@ var ThemeOptions = function () { var item = $(''); var chip = $(''); var lbl = $(''); - chip.on('click', function () { sel.val(mode).trigger('change'); }); + // refreshAll() is called directly too: a throwing EARLIER direct + // change handler (e.g. updateFieldSettings on the real page) aborts + // jQuery's synthetic dispatch, and then the outline would not move + chip.on('click', function () { sel.val(mode).trigger('change'); refreshAll(); }); item.append(chip).append(lbl); chips.append(item); }); @@ -835,6 +838,10 @@ var ThemeOptions = function () { } refreshAll(); sel.on('change', refreshAll); + // Delegated backup: a REAL user change event bubbles natively to document even + // when an earlier direct handler threw (jQuery only aborts synthetic triggers), + // so the active outline still moves on the chosen swatch (row 122). + $(document).on('change', 'select[name="navbarfontcolor"]', refreshAll); if (customInput.length) { customInput.on('input change', refreshAll); } $.each(['fontcolor', 'primarycolor', 'secondarycolor', 'tertiarycolor'], function (i, key) { globalForm.find('#simple_edit_options_' + key).on('input change', refreshAll); diff --git a/options/options.twig b/options/options.twig index 0795f71..619a493 100644 --- a/options/options.twig +++ b/options/options.twig @@ -43,7 +43,7 @@ heuristically cached copy (the file has only Last-Modified/ETag, no Cache-Control). Re-register it with a version token: bump OPTIONS_JS_TOKEN below whenever options/options.js changes, so every browser fetches the new file once. #} -{% set OPTIONS_JS_TOKEN = '20261126.3' %} +{% set OPTIONS_JS_TOKEN = '20261126.4' %} {{ unregisterScriptFile(optionsPath ~ '/options.js') }} {{ registerScriptFile(optionsPath ~ '/options.js?v=' ~ OPTIONS_JS_TOKEN, 'POS_END') }}