Fix being unable to go to tab 1

This commit is contained in:
j433866 2019-04-04 14:42:21 +01:00
parent 0804647441
commit 9690ccd8a0
3 changed files with 5 additions and 5 deletions

View File

@ -266,7 +266,7 @@ class InputWaiter {
/**
* Handler for messages sent back by LoaderWorkers
*
* @param {MessageEvent} else
* @param {MessageEvent} e
*/
handleLoaderMessage(e) {
const r = e.data;
@ -1022,7 +1022,7 @@ class InputWaiter {
*/
goToTab() {
const tabNum = parseInt(window.prompt("Enter tab number:", this.getActiveTab().toString()), 10);
if (this.getInputIndex(tabNum)) {
if (this.getInputIndex(tabNum) >= 0) {
this.changeTab(tabNum, this.app.options.syncTabs);
}
}

View File

@ -544,7 +544,7 @@ class OutputWaiter {
*/
goToTab() {
const tabNum = parseInt(window.prompt("Enter tab number:", this.getActiveTab().toString()), 10);
if (this.getOutputIndex(tabNum)) {
if (this.getOutputIndex(tabNum) >= 0) {
this.changeTab(tabNum, this.app.options.syncTabs);
}
}

View File

@ -256,7 +256,7 @@
<div class="io-info" id="input-info"></div>
<div class="io-info" id="input-selection-info"></div>
</div>
<div id="input-tabs-wrapper" style="display: none;">
<div id="input-tabs-wrapper" style="display: none;" class="no-select">
<span id="btn-previous-input-tab" class="input-tab-buttons">
&lt;
</span>
@ -326,7 +326,7 @@
</span>
</div>
<div id="output-wrapper">
<div id="output-tabs-wrapper" style="display: none">
<div id="output-tabs-wrapper" style="display: none" class="no-select">
<span id="btn-previous-output-tab" class="output-tab-buttons">
&lt;
</span>