Make code highlight unfocusable

pull/4544/head
Cagatay Civici 2023-10-04 01:28:52 +03:00
parent 63cfc15a25
commit ff35d6d0df
1 changed files with 4 additions and 1 deletions

View File

@ -9,7 +9,10 @@ const CodeHighlight = {
else if (modifiers.css || value === 'css') el.className = 'language-css';
else el.className = 'language-markup';
DomHandler.isClient() && window.Prism.highlightElement(el.children[0]);
if (DomHandler.isClient()) {
window.Prism.highlightElement(el.children[0]);
el.children[0].parentElement.setAttribute('tabindex', '-1');
}
}
};