Skip to content

Commit 9ed43fb

Browse files
authored
Autofocus simulator when expanding the mini sim (microsoft#8512)
1 parent 47f8df9 commit 9ed43fb

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

webapp/src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export class ProjectView
202202
this.initSimulatorMessageHandlers();
203203

204204
// add user hint IDs and callback to hint manager
205-
this.hintManager.addHint(ProjectView.tutorialCardId, this.tutorialCardHintCallback.bind(this));
205+
if (pxt.BrowserUtils.useOldTutorialLayout) this.hintManager.addHint(ProjectView.tutorialCardId, this.tutorialCardHintCallback.bind(this));
206206
}
207207

208208
private autoRunOnStart(): boolean {

webapp/src/sidepanel.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import * as filelist from "./filelist";
88
import * as keymap from "./keymap";
99
import * as serialindicator from "./serialindicator"
1010
import * as simtoolbar from "./simtoolbar";
11+
import * as simulator from "./simulator";
1112

1213
import { TabContent } from "./components/core/TabContent";
1314
import { TabPane } from "./components/core/TabPane";
@@ -70,6 +71,7 @@ export class Sidepanel extends data.Component<SidepanelProps, SidepanelState> {
7071
protected showSimulatorTab = () => {
7172
this.props.showMiniSim(false);
7273
this.setState({ activeTab: SIMULATOR_TAB, height: undefined });
74+
simulator.driver.focus();
7375
}
7476

7577
protected showTutorialTab = () => {

0 commit comments

Comments
 (0)