From bf7c27c2cbf3eb56a0a4c5141e39b152c51614b5 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 1 Jul 2026 04:53:56 -0400 Subject: feat: admin gui map, item, and objects mostly complete --- internal/admin/static/colorpicker.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal/admin/static/colorpicker.js') diff --git a/internal/admin/static/colorpicker.js b/internal/admin/static/colorpicker.js index 9431e83..bba438e 100644 --- a/internal/admin/static/colorpicker.js +++ b/internal/admin/static/colorpicker.js @@ -62,6 +62,7 @@ window.cssToXtermIdx = function(css) { (function() { var pickerEl = null, boundInput = null, boundSwatch = null; + window._colorPickerActive = false; function ensurePicker() { if (pickerEl) return; @@ -114,6 +115,7 @@ window.cssToXtermIdx = function(css) { idx = parseInt(raw, 16) || 0; } var hex = xtermIdxToHex(idx); + window._colorPickerActive = true; inputEl.value = hex; if (swatchEl) swatchEl.style.background = xtermToCss(idx); @@ -153,7 +155,12 @@ window.cssToXtermIdx = function(css) { window.hideColorPicker = hidePicker; function hidePicker() { if (pickerEl) pickerEl.style.display = 'none'; + var input = boundInput; boundInput = null; boundSwatch = null; + window._colorPickerActive = false; + if (input && input.isConnected) { + input.dispatchEvent(new Event('input', {bubbles:true})); + } } document.addEventListener('click', function(e) { -- cgit v1.2.3