Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress keyboard shortcuts in notebook output #6825

Merged
merged 3 commits into from
May 13, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions panel/_templates/doc_nb_js.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@
return
}
const py_version = docs[0].version.replace('rc', '-rc.').replace('.dev', '-dev.')
function embed_document(root) {
async function embed_document(root) {
var Bokeh = get_bokeh(root)
Bokeh.embed.embed_items_notebook(docs_json, render_items);
await Bokeh.embed.embed_items_notebook(docs_json, render_items);
for (const render_item of render_items) {
for (const root_id of render_item.root_ids) {
const id_el = document.getElementById(root_id)
if (id_el.children.length && (id_el.children[0].className === 'bk-root')) {
if (id_el.children.length && id_el.children[0].hasAttribute('data-root-id')) {
const root_el = id_el.children[0]
root_el.id = root_el.id + '-rendered'
for (const child of root_el.children) {
child.setAttribute('data-lm-suppress-shortcuts', 'true')
philippjfr marked this conversation as resolved.
Show resolved Hide resolved
philippjfr marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
}
Expand Down
Loading