fix: focus on HotKeys by default
This commit is contained in:
committed by
mrugesh
parent
023df09289
commit
465f206a9d
@ -105,6 +105,7 @@ export class BackEnd extends Component {
|
|||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.initializeComponent();
|
this.initializeComponent();
|
||||||
window.addEventListener('resize', this.updateDimensions);
|
window.addEventListener('resize', this.updateDimensions);
|
||||||
|
this._container.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDimensions() {
|
updateDimensions() {
|
||||||
@ -186,6 +187,7 @@ export class BackEnd extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Hotkeys
|
<Hotkeys
|
||||||
|
innerRef={c => (this._container = c)}
|
||||||
introPath={introPath}
|
introPath={introPath}
|
||||||
nextChallengePath={nextChallengePath}
|
nextChallengePath={nextChallengePath}
|
||||||
prevChallengePath={prevChallengePath}
|
prevChallengePath={prevChallengePath}
|
||||||
|
@ -63,6 +63,7 @@ export class Project extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
updateChallengeMeta({ ...challengeMeta, title, challengeType });
|
updateChallengeMeta({ ...challengeMeta, title, challengeType });
|
||||||
challengeMounted(challengeMeta.id);
|
challengeMounted(challengeMeta.id);
|
||||||
|
this._container.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps) {
|
componentDidUpdate(prevProps) {
|
||||||
@ -111,6 +112,7 @@ export class Project extends Component {
|
|||||||
const blockNameTitle = `${blockName} - ${title}`;
|
const blockNameTitle = `${blockName} - ${title}`;
|
||||||
return (
|
return (
|
||||||
<Hotkeys
|
<Hotkeys
|
||||||
|
innerRef={c => (this._container = c)}
|
||||||
introPath={introPath}
|
introPath={introPath}
|
||||||
nextChallengePath={nextChallengePath}
|
nextChallengePath={nextChallengePath}
|
||||||
prevChallengePath={prevChallengePath}
|
prevChallengePath={prevChallengePath}
|
||||||
|
Reference in New Issue
Block a user