mirror of
https://github.com/tabler/tabler.git
synced 2026-08-29 13:21:29 +04:00
Fix signature pad clear button accessibility and canvas height drift (#2789)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
6a63e4069c
commit
dbe391dc23
@@ -50,8 +50,6 @@ ${clearSnippet}
|
||||
function resizeCanvas() {
|
||||
const ratio = Math.max(window.devicePixelRatio || 1, 1);
|
||||
|
||||
console.log(canvas.offsetWidth, canvas.offsetHeight);
|
||||
|
||||
canvas.width = canvas.offsetWidth * ratio;
|
||||
canvas.height = canvas.offsetHeight * ratio;
|
||||
canvas.getContext("2d").scale(ratio, ratio);
|
||||
@@ -72,9 +70,9 @@ ${extraSnippet}
|
||||
{
|
||||
clear && (
|
||||
<div class="position-absolute top-0 end-0 p-2">
|
||||
<div class="btn btn-icon" id={`signature-${id}-clear`} title="Clear signature" data-bs-toggle="tooltip">
|
||||
<button type="button" class="btn btn-icon" id={`signature-${id}-clear`} title="Clear signature" data-bs-toggle="tooltip">
|
||||
<Icon name="trash" />{' '}
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user