diff --git a/options/options.js b/options/options.js
index 945d533..d444bac 100644
--- a/options/options.js
+++ b/options/options.js
@@ -788,10 +788,16 @@ var ThemeOptions = function () {
var item = $('');
var chip = $('');
var lbl = $('');
- // 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(); });
+ // row 122: set the value and refresh FIRST, then fire change inside
+ // try/catch — a throwing handler in the synthetic change chain aborts
+ // the rest of this click handler, and without this the outline would
+ // not move when clicking a swatch (while the dropdown works via the
+ // delegated document handler, because native events still bubble).
+ chip.on('click', function () {
+ sel.val(mode);
+ refreshAll();
+ try { sel.trigger('change'); } catch (e) { /* save re-serializes anyway */ }
+ });
item.append(chip).append(lbl);
chips.append(item);
});
diff --git a/options/options.twig b/options/options.twig
index 619a493..ec201db 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.4' %}
+{% set OPTIONS_JS_TOKEN = '20261126.5' %}
{{ unregisterScriptFile(optionsPath ~ '/options.js') }}
{{ registerScriptFile(optionsPath ~ '/options.js?v=' ~ OPTIONS_JS_TOKEN, 'POS_END') }}