Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jupyterlab_hide_code",
"version": "4.0.0",
"version": "4.1.1",
"description": "A button in JupyterLab to run the code cells and then to hide the code cells.",
"keywords": [
"jupyter",
Expand Down
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ export class ButtonExtension
if (!hidden) {
return;
}
// Let keys through when the event originates inside a cell's output
// area — ipywidgets and similar interactive outputs live there and
// may need keys for their own handlers.
const target = event.target as HTMLElement | null;
if (target && target.closest('.jp-OutputArea')) {
return;
}
// Cell type: m, y, r, 1-6
// Add/remove/reorder: a, b, d (dd), x, v, z, Shift+M
const blockedKeys = [
Expand Down
Loading