diff --git a/src/app/styles/CustomHtml.css.ts b/src/app/styles/CustomHtml.css.ts
index e5e74b61..c8e26833 100644
--- a/src/app/styles/CustomHtml.css.ts
+++ b/src/app/styles/CustomHtml.css.ts
@@ -113,6 +113,9 @@ export const CodeBlockControls = style({
[`${CodeBlock}:hover &`]: {
visibility: 'visible',
},
+ [`${CodeBlock}:focus-within &`]: {
+ visibility: 'visible',
+ },
},
});