Skip to content

Commit e3085b9

Browse files
authored
fix: Filter text field in data browser partly looses focus when hitting enter key to apply filter (#2992)
1 parent 53a4d99 commit e3085b9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/dashboard/Data/Browser/DataBrowser.react.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,17 @@ export default class DataBrowser extends React.Component {
425425
if (this.props.disableKeyControls) {
426426
return;
427427
}
428+
429+
// Check if the event target is an input or textarea
430+
const target = e.target;
431+
const isInputElement = target && (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA');
432+
433+
// Ignore all keyboard events when focus is on input/textarea elements
434+
// This allows normal text editing behavior in filter inputs
435+
if (isInputElement) {
436+
return;
437+
}
438+
428439
if (e.keyCode === 67 && (e.ctrlKey || e.metaKey)) {
429440
// Check for text selection FIRST
430441
const selection = window.getSelection();

0 commit comments

Comments
 (0)