mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
Bring highlighting back.
Fix backgroundMagic using output result instead of dish value
This commit is contained in:
parent
f1a2cf7efc
commit
35d6c7d79e
5 changed files with 86 additions and 23 deletions
|
@ -504,6 +504,9 @@ class InputWaiter {
|
|||
const fileOverlay = document.getElementById("input-file");
|
||||
if (fileOverlay.style.display === "block") return;
|
||||
|
||||
// Remove highlighting from input and output panes as the offsets might be different now
|
||||
this.manager.highlighter.removeHighlights();
|
||||
|
||||
const textArea = document.getElementById("input-text");
|
||||
const value = (textArea.value !== undefined) ? textArea.value : "";
|
||||
const activeTab = this.getActiveTab();
|
||||
|
@ -857,6 +860,10 @@ class InputWaiter {
|
|||
*/
|
||||
changeTab(inputNum, changeOutput) {
|
||||
const tabsList = document.getElementById("input-tabs");
|
||||
|
||||
this.manager.highlighter.removeHighlights();
|
||||
getSelection().removeAllRanges();
|
||||
|
||||
let found = false;
|
||||
let minNum = Number.MAX_SAFE_INTEGER;
|
||||
for (let i = 0; i < tabsList.children.length; i++) {
|
||||
|
@ -985,6 +992,9 @@ class InputWaiter {
|
|||
this.manager.worker.cancelBake();
|
||||
this.manager.output.removeAllOutputs();
|
||||
|
||||
this.manager.highlighter.removeHighlights();
|
||||
getSelection().removeAllRanges();
|
||||
|
||||
const tabsList = document.getElementById("input-tabs").children;
|
||||
for (let i = tabsList.length - 1; i >= 0; i--) {
|
||||
tabsList.item(i).remove();
|
||||
|
@ -1002,6 +1012,9 @@ class InputWaiter {
|
|||
const inputNum = this.getActiveTab();
|
||||
if (inputNum === -1) return;
|
||||
|
||||
this.manager.highlighter.removeHighlights();
|
||||
getSelection().removeAllRanges();
|
||||
|
||||
this.updateInputValue(inputNum, "");
|
||||
|
||||
this.set({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue