Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Al ejecutar cambia a la pestaña que corresponde #460

Merged
merged 1 commit into from
Nov 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions app/elements/gobstones-teacher/gobstones-teacher.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,7 @@

this.runner.addEventListener("run", ({ detail }) => {
if (!this.isBlocksOrCodeTabSelected(this.selectedTab)) {
this.runner.showToast(this.localize("go-to-first-tabs"));
this.runner.stop();
return;
this._goToCodeTab();
}

this._currentEditor()._onRunRequest(detail)
Expand Down Expand Up @@ -508,12 +506,16 @@

// @faloi: sería ideal que no se ejecute el código, sino que solamente se compile
_validateCode: function() {
this.selectedTab = this.constructionMode == 'blocks' ? ID_BLOCKS : ID_CODE;
this._goToCodeTab();
const boardsPanel = document.getElementById("boards");
const runner = boardsPanel.$.runner;
runner.requestRun();
},

_goToCodeTab() {
this.selectedTab = this.constructionMode == 'blocks' ? ID_BLOCKS : ID_CODE;
},

_getUniqueSolutionName: function() {
let name = null;
let withExistsWarning = false;
Expand Down