File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,6 +283,21 @@ def generate_html_repr(
283283 const table = document.getElementById('table_{ unique_id } ');
284284 const rows = table.getElementsByClassName('data-row');
285285 if (searchInput) {{
286+ // Prevent notebook keyboard shortcuts from interfering
287+ // with search input
288+ searchInput.addEventListener('keydown', function(event) {{
289+ // Don't stop propagation for Ctrl/Cmd combinations
290+ // (e.g., Ctrl+A, Ctrl+C)
291+ // These should work normally in the input field
292+ if (event.ctrlKey || event.metaKey) {{
293+ return;
294+ }}
295+ // Stop all other keys from reaching the notebook
296+ event.stopPropagation();
297+ }});
298+ searchInput.addEventListener('keyup', function(event) {{
299+ event.stopPropagation();
300+ }});
286301 searchInput.addEventListener('input', function() {{
287302 const searchText = this.value.toLowerCase();
288303 for (let i = 0; i < rows.length; i++) {{
You can’t perform that action at this time.
0 commit comments