Skip to content

Commit

Permalink
Fix copy invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
chebizarro committed Nov 2, 2024
1 parent 1a4443a commit 5c19ff4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/pages/bc-send-payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export class SendPayment extends withTwind()(BitcoinConnectElement) {
</a>
<a
@click=${this._copyInvoice}
@keydown=${this._copyInvoice}
@keydown=${this._handleKeydown}
tabindex="0"
class="
flex gap-1
Expand Down Expand Up @@ -346,6 +346,14 @@ export class SendPayment extends withTwind()(BitcoinConnectElement) {
}
this._isPaying = false;
}

public _handleKeydown(event: KeyboardEvent) {
if (event.key === 'Enter' || event.key === ' ') {
event.preventDefault();
this._copyInvoice();
}
}

}

declare global {
Expand Down

0 comments on commit 5c19ff4

Please sign in to comment.