diff --git a/src/myfasthtml/assets/datagrid/datagrid.js b/src/myfasthtml/assets/datagrid/datagrid.js
index 9e9a891..922e27e 100644
--- a/src/myfasthtml/assets/datagrid/datagrid.js
+++ b/src/myfasthtml/assets/datagrid/datagrid.js
@@ -673,9 +673,9 @@ function updateDatagridSelection(datagridId) {
// Clear browser text selection to prevent stale ranges from reappearing
// But skip if an input/textarea/contenteditable has focus (would clear text cursor)
- if (!document.activeElement?.closest('input, textarea, [contenteditable]')) {
- window.getSelection()?.removeAllRanges();
- }
+ // if (!document.activeElement?.closest('input, textarea, [contenteditable]')) {
+ // window.getSelection()?.removeAllRanges();
+ // }
// OPTIMIZATION: scope to table instead of scanning the entire document
const table = document.getElementById(`t_${datagridId}`);
diff --git a/src/myfasthtml/controls/DataGrid.py b/src/myfasthtml/controls/DataGrid.py
index 562c9a3..9b99d3a 100644
--- a/src/myfasthtml/controls/DataGrid.py
+++ b/src/myfasthtml/controls/DataGrid.py
@@ -794,7 +794,7 @@ class DataGrid(MultipleInstance):
res.append(Span(value_str[:index], cls=f"{css_class}"))
res.append(Span(value_str[index:index + len_keyword], cls="dt2-highlight-1"))
if index + len_keyword < len(value_str):
- res.append(Span(value_str[index + len_keyword:], cls=f"{css_class}"))
+ res.append(Span(value_str[index + len_keyword:]))
return Span(*res, cls=f"{css_class} truncate", style=style) if len(res) > 1 else res[0]