Skip to content

Commit

Permalink
Focus on the workspace after the instructions dialog is closed, if th…
Browse files Browse the repository at this point in the history
…ere are currently no blocks in it.
  • Loading branch information
seanlip committed Dec 9, 2016
1 parent d2eaac6 commit 6a2776d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion appengine/accessible/js/level-manager.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@ musicGame.LevelManagerService = ng.core.Class({
this.showModal_(
'Instructions', messageParagraphs, actionButtonsInfo,
function() {
document.getElementById('musicGameInstructionsBtn').focus();
if (blocklyApp.workspace.topBlocks_.length > 0) {
document.getElementById('musicGameInstructionsBtn').focus();
} else {
document.getElementById(
blocklyApp.ID_FOR_EMPTY_WORKSPACE_BTN).focus();
}
});
},
gradeCurrentLevel: function() {
Expand Down

0 comments on commit 6a2776d

Please sign in to comment.