Skip to content

Commit 195758a

Browse files
Copilottimheuer
andcommitted
Add cell blur safety check before sorting and finalize implementation
Co-authored-by: timheuer <[email protected]>
1 parent 5a90523 commit 195758a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/webview/webview.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ let currentSortDirection = 'asc'; // 'asc' or 'desc'
9595
e.preventDefault();
9696
e.stopPropagation();
9797

98+
// Blur any currently focused editable cells to ensure changes are saved
99+
const editableCell = grid.querySelector('[contenteditable="true"]');
100+
if (editableCell) {
101+
editableCell.blur();
102+
}
103+
98104
const columnKey = getColumnKeyFromHeader(header, index);
99105
if (columnKey) {
100106
sortByColumn(columnKey);

0 commit comments

Comments
 (0)