mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
Enable retainContextWhenHidden to keep webview from having to be reloaded everytime it's closed; fix issues with text input focusing
This commit is contained in:
@@ -41,15 +41,14 @@ export class SidebarProvider implements vscode.WebviewViewProvider {
|
||||
// and executes code based on the message that is recieved
|
||||
this.setWebviewMessageListener(webviewView.webview)
|
||||
|
||||
// Logs show up in bottom panel > Debug Console
|
||||
//console.log("registering listener")
|
||||
|
||||
// Listen for when the panel becomes visible
|
||||
// https://github.com/microsoft/vscode-discussions/discussions/840
|
||||
webviewView.onDidChangeVisibility((e: any) => {
|
||||
if (e && e.visible) {
|
||||
// Your view is visible
|
||||
this.postMessageToWebview({ type: "action", action: "didBecomeVisible" })
|
||||
} else {
|
||||
// Your view is hidden
|
||||
}
|
||||
// we don't get any event back (so can't do e.visible), but this function does get called when the view changes visibility
|
||||
this.postMessageToWebview({ type: "action", action: "didBecomeVisible" })
|
||||
})
|
||||
|
||||
// Listen for when color changes
|
||||
|
||||
Reference in New Issue
Block a user