diff --git a/CHANGELOG.md b/CHANGELOG.md index 0916b0a8..1998e1ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,9 @@ - xy/multixy: add `axisLock` property; allow locking one the axis by holding `Shift` while dragging if `axisLock` is not set, bypasses it otherwise. - knob/fader/range: add `colorKnob` property -- misc - - on Mac, start with the launcher window hidden if `Start minimized` is set +- launcher + - on Mac, start hidden if `Start minimized` is set + - allow dropping files into file fields ## 1.25.7 diff --git a/src/launcher/settings.js b/src/launcher/settings.js index c9b28d9c..5a2b088f 100644 --- a/src/launcher/settings.js +++ b/src/launcher/settings.js @@ -147,6 +147,21 @@ class Settings { }) }) + field.addEventListener('drop', (e) => { + e.preventDefault() + e.stopPropagation() + let paths = [] + for (var f of event.dataTransfer.files) { + if (f.path.includes(' ')) { + paths.push('"' + f.path + '"') + } else { + paths.push(f.path) + } + } + input.value = paths.join(' ') + DOM.dispatchEvent(input, 'change') + }); + } reset = field.appendChild(html`