mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 14:11:02 +01:00
Correctly handle clicking cancel on go to dialog
This commit is contained in:
parent
f55102716e
commit
15b5cf7c20
@ -1381,7 +1381,11 @@ class InputWaiter {
|
||||
*/
|
||||
async goToTab() {
|
||||
const inputNums = await this.getInputNums();
|
||||
const tabNum = parseInt(window.prompt(`Enter tab number (${inputNums.min} - ${inputNums.max}):`, this.getActiveTab().toString()), 10);
|
||||
let tabNum = window.prompt(`Enter tab number (${inputNums.min} - ${inputNums.max}):`, this.getActiveTab().toString());
|
||||
|
||||
if (tabNum === null) return;
|
||||
tabNum = parseInt(tabNum, 10);
|
||||
|
||||
this.changeTab(tabNum, this.app.options.syncTabs);
|
||||
}
|
||||
|
||||
|
@ -797,8 +797,12 @@ class OutputWaiter {
|
||||
*/
|
||||
goToTab() {
|
||||
const min = this.getSmallestInputNum(),
|
||||
max = this.getLargestInputNum(),
|
||||
tabNum = parseInt(window.prompt(`Enter tab number (${min} - ${max}):`, this.getActiveTab().toString()), 10);
|
||||
max = this.getLargestInputNum();
|
||||
|
||||
let tabNum = window.prompt(`Enter tab number (${min} - ${max}):`, this.getActiveTab().toString());
|
||||
if (tabNum === null) return;
|
||||
tabNum = parseInt(tabNum, 10);
|
||||
|
||||
if (this.outputExists(tabNum)) {
|
||||
this.changeTab(tabNum, this.app.options.syncTabs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user