Skip to content

Commit c8f894b

Browse files
authored
[Cherry-pick] Fix Canvas blue outline when focused with Tab (#2450) (#2506)
Add a css property to disable the outline. Fixes https://youtrack.jetbrains.com/issue/CMP-9040 ## Testing N/A ## Release Notes #2450
2 parents 41e9a8c + 2b23aed commit c8f894b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

compose/ui/ui/src/webCommonW3C/kotlin/androidx/compose/ui/window/ComposeWindow.w3c.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ fun ComposeViewport(
733733
val canvas = document.createElement("canvas") as HTMLCanvasElement
734734
canvas.setAttribute("tabindex", "0")
735735
canvas.setAttribute("role", "generic")
736+
canvas.style.outline = "none" // Fixes https://youtrack.jetbrains.com/issue/CMP-9040
736737

737738
// Create a common container (parent html element) for canvas and the interop container
738739
// to position at the same place - the interop container is position at 0,0 relative to <canvas>.

0 commit comments

Comments
 (0)