Skip to content

Commit fc771bc

Browse files
committed
fix js backend 2
1 parent c814c4b commit fc771bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/fidget/htmlbackend.nim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,10 @@ proc drawStart() =
421421
422422
canvas.style.display = "block"
423423
canvas.style.position = "absolute"
424-
canvas.style.zIndex = "-1"
424+
when type(canvas.style.zIndex) is cstring:
425+
canvas.style.zIndex = "-1"
426+
else:
427+
canvas.style.zIndex = -1
425428
canvas.style.left = cstring($scrollBox.x & "px")
426429
canvas.style.top = cstring($scrollBox.y & "px")
427430
canvas.style.width = cstring($width & "px")

0 commit comments

Comments
 (0)