Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ const CliBody = (props: Props) => {
}

timerClickRef.current = setTimeout(() => {
if (!window.getSelection()?.toString()) {
const isInputFocused = document.activeElement === inputEl

if (!window.getSelection()?.toString() && !isInputFocused) {
inputEl?.focus()
document.execCommand('selectAll', false)
document.getSelection()?.collapseToEnd()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { parseContentEditableChangeHtml } from 'uiSrc/components/ContentEditable
import styles from './styles.module.scss'

export interface Props {
command: string;
setInputEl: Function;
setCommand: (command: string) => void;
onKeyDown: (event: React.KeyboardEvent<HTMLSpanElement>) => void;
dbIndex: number;
command: string
setInputEl: Function
setCommand: (command: string) => void
onKeyDown: (event: React.KeyboardEvent<HTMLSpanElement>) => void
dbIndex: number
}

const CliInput = (props: Props) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import CliAutocomplete from './CliAutocomplete'
import CliInput from './CliInput'

export interface Props {
command: string;
wordsTyped: number;
setInputEl: Function;
setCommand: (command: string) => void;
onKeyDown: (event: React.KeyboardEvent<HTMLSpanElement>) => void;
command: string
wordsTyped: number
setInputEl: Function
setCommand: (command: string) => void
onKeyDown: (event: React.KeyboardEvent<HTMLSpanElement>) => void
}

const CliInputWrapper = (props: Props) => {
Expand Down