Set explicit cursor style property on pay button with custom text (#4107)

We need to set "cursor: pointer;" explicitly on pay buttons with custom text because the <button> HTML tag default pointer is not a cursor. This is not an issue for the default button because it uses the <input> tag which has "cursor: pointer;" by default in browsers.

Close #4104
This commit is contained in:
Umar Bolatov 2022-09-08 22:28:03 -07:00 committed by GitHub
parent 7f8e322e9c
commit 8fae38deca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,7 +159,7 @@ function inputChanges(event, buttonSize) {
}
html += srvModel.payButtonText
? `<button type="submit" class="submit" name="submit" style="min-width:${width};min-height:${height};border-radius:4px;border-style:none;background-color:#0f3b21;" title="Pay with BTCPay Server, a Self-Hosted Bitcoin Payment Processor"><span style="color:#fff">${esc(srvModel.payButtonText)}</span>\n` +
? `<button type="submit" class="submit" name="submit" style="min-width:${width};min-height:${height};border-radius:4px;border-style:none;background-color:#0f3b21;cursor:pointer;" title="Pay with BTCPay Server, a Self-Hosted Bitcoin Payment Processor"><span style="color:#fff">${esc(srvModel.payButtonText)}</span>\n` +
(srvModel.payButtonImageUrl? `<img src="${esc(srvModel.payButtonImageUrl)}" style="height:${parseInt(height.replace('px', ''))}px;display:inline-block;padding:5% 0 5% 5px;vertical-align:middle;">\n` : '') +
'</button>'
: ` <input type="image" class="submit" name="submit" src="${esc(srvModel.payButtonImageUrl)}" style="width:${width}" alt="Pay with BTCPay Server, a Self-Hosted Bitcoin Payment Processor">\n`;