From 9db5c840aa71e7b77386955e293d5f710ad56b86 Mon Sep 17 00:00:00 2001 From: "thgO.O" Date: Fri, 8 Aug 2025 10:41:01 -0300 Subject: [PATCH] fix: restrict input selection to SelectedInputs to avoid clearing output labels --- BTCPayServer/Views/UIWallets/CoinSelection.cshtml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/Views/UIWallets/CoinSelection.cshtml b/BTCPayServer/Views/UIWallets/CoinSelection.cshtml index 448d137b8..631354579 100644 --- a/BTCPayServer/Views/UIWallets/CoinSelection.cshtml +++ b/BTCPayServer/Views/UIWallets/CoinSelection.cshtml @@ -319,7 +319,8 @@ document.addEventListener("DOMContentLoaded", function () { res = res.filter(i => i !== item.outpoint); } - $("select option").each(function () { + // Do NOT use $("select option") or you'll break other selects like output labels + $("select[name='SelectedInputs'] option").each(function () { var selected = res.indexOf($(this).attr("value")) !== -1; $(this).attr("selected", selected ? "selected" : null); });