The TWebSignatureCapture demo works without problems. But in my app, when drawing with the mouse pointer, the actual drawing is around 100 pixel on top of the pointer. In addition, I cannot click the embedded Clear button. When hovering over the button, the pointer does not change it's shape.
The TWebSignatureCapture is on a panel. The panel is on a form. The form is embedded in a DIV. All controls on the form are epAbsolute.
This is the definition of the TWebSignatureCapture in the .dfm:
object SignatureCapture: TWebSignatureCapture
Left = 3
Top = 668
Width = 360
Height = 243
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ChildOrder = 6
TabOrder = 2
ClearButton.Image.Data = {
0954506E67496D61676589504E470D0A1A0A0000000D49484452000000180000
001808040000004A7EF573000000644944415478DA6364C0064E319842592719
2C50A518B16AF80F17FF8FAE8211C34C7CE0008323C22462C0330669640D8C04
94FFA75803494E3AC960468486FD0C4E0867C01CF51F2709341FD9DDA31A4635
0CA806FC004DC31E0667021A363204303000003E4078198A7390E00000000049
454E44AE426082}
TextPosition.Line.Color = clGray
TextPosition.LineVisible = False
TextPosition.Position = ltpTopLeft
Text = ''
Pen.Color = clBlue
end
(using the original Clear button does not change anything)
In the index.html, the component is rendered like this:
<canvas id="TGuestRegForm_SignatureCapture122" zindex="0" height="243" width="360"
tabindex="3" role="" style="position: absolute; height: 243px; width: 360px; overflow: hidden;
outline: none; top: 668px; left: 3px; box-sizing: border-box; user-select: none;
-webkit-tap-highlight-color: transparent; font-family: Arial; font-style: normal;
font-size: 12pt; color: rgb(0, 0, 0); border-style: solid; border-width: 1px;
border-color: rgb(192, 192, 192);"></canvas>
This screenshot of the running app shows the position of the mouse pointer when drawing the blue horizontal line
This happens with Firefox, Opera and Edge. Using Chrome, it's just the opposite: The drawing is below of the mouse pointer.
I tried to fiddle with the TWebSignatureCapture demo app to show the same behaviour in order to make the problem reproducable, but with no success. If it helps, I would send a PM with my project files.
Any ideas would be very much appreciated.