diff --git a/src/app/workspace/cmdinput/aichat.tsx b/src/app/workspace/cmdinput/aichat.tsx index 544210b0b..8b5e76924 100644 --- a/src/app/workspace/cmdinput/aichat.tsx +++ b/src/app/workspace/cmdinput/aichat.tsx @@ -104,15 +104,11 @@ class AIChat extends React.Component<{}, {}> { } onTextAreaFocused(e: any) { - mobx.action(() => { - GlobalModel.inputModel.setAuxViewFocus(true); - })(); + GlobalModel.inputModel.setAuxViewFocus(true); } onTextAreaBlur(e: any) { - mobx.action(() => { - GlobalModel.inputModel.setAuxViewFocus(false); - })(); + GlobalModel.inputModel.setAuxViewFocus(false); } // Adjust the height of the textarea to fit the text diff --git a/src/app/workspace/cmdinput/auxview.tsx b/src/app/workspace/cmdinput/auxview.tsx index eb3e272a7..829d1c65c 100644 --- a/src/app/workspace/cmdinput/auxview.tsx +++ b/src/app/workspace/cmdinput/auxview.tsx @@ -16,11 +16,12 @@ interface AuxiliaryCmdViewProps { titleBarContents?: React.ReactElement[]; children?: React.ReactNode; onClose?: React.MouseEventHandler; + onScrollbarInitialized?: () => void; scrollable?: boolean; } export const AuxiliaryCmdView: React.FC = observer((props) => { - const { title, className, iconClass, titleBarContents, children, onClose } = props; + const { title, className, iconClass, titleBarContents, children, onClose, onScrollbarInitialized } = props; return (
@@ -50,6 +51,8 @@ export const AuxiliaryCmdView: React.FC = observer((props {children} diff --git a/src/app/workspace/cmdinput/cmdinput.tsx b/src/app/workspace/cmdinput/cmdinput.tsx index f25bcf7ac..cfa2326dc 100644 --- a/src/app/workspace/cmdinput/cmdinput.tsx +++ b/src/app/workspace/cmdinput/cmdinput.tsx @@ -73,7 +73,6 @@ class CmdInput extends React.Component<{}, {}> { return; } GlobalModel.inputModel.setAuxViewFocus(false); - GlobalModel.inputModel.giveFocus(); } @boundMethod @@ -232,12 +231,7 @@ class CmdInput extends React.Component<{}, {}> {
-
+
0}>
{ lastClickTs: number = 0; containingText: mobx.IObservableValue = mobx.observable.box(""); - componentDidMount() { + /** + * Handles the OverlayScrollbars initialization event to set the scroll position without it being overridden. + */ + @boundMethod + handleScrollbarInitialized() { const inputModel = GlobalModel.inputModel; let hitem = inputModel.getHistorySelectedItem(); if (hitem == null) { @@ -225,7 +229,7 @@ class HistoryInfo extends React.Component<{}, {}> { render() { const inputModel = GlobalModel.inputModel; const selItem = inputModel.getHistorySelectedItem(); - const hitems = inputModel.getFilteredHistoryItems().slice().reverse(); + const hitems = inputModel.getFilteredHistoryItems(); const opts = inputModel.historyQueryOpts.get(); let hitem: HistoryItem = null; let snames: Record = {}; @@ -244,6 +248,7 @@ class HistoryInfo extends React.Component<{}, {}> { titleBarContents={this.getTitleBarContents()} iconClass="fa-sharp fa-solid fa-clock-rotate-left" scrollable={true} + onScrollbarInitialized={this.handleScrollbarInitialized} >
{ - console.log("clearing info msg"); if (this.activeAuxView.get() != appconst.InputAuxView_Info) { return; }