mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Change pasting to keep cursor position.
Move output scrolling to changeTab() instead of set()
This commit is contained in:
parent
39101610d5
commit
98af95a6ce
2 changed files with 11 additions and 4 deletions
|
@ -293,7 +293,6 @@ class OutputWaiter {
|
|||
inputHighlighter.display = "none";
|
||||
|
||||
outputText.value = output.error;
|
||||
outputText.scroll(0, 0);
|
||||
outputHtml.innerHTML = "";
|
||||
} else if (output.status === "baked" || output.status === "inactive") {
|
||||
document.querySelector("#output-loader .loading-msg").textContent = `Loading output ${inputNum}`;
|
||||
|
@ -327,7 +326,6 @@ class OutputWaiter {
|
|||
|
||||
outputText.value = "";
|
||||
outputHtml.innerHTML = output.data.result;
|
||||
outputHtml.scroll(0, 0);
|
||||
|
||||
// Execute script sections
|
||||
scriptElements = outputHtml.querySelectorAll("script");
|
||||
|
@ -360,7 +358,6 @@ class OutputWaiter {
|
|||
inputHighlighter.display = "block";
|
||||
|
||||
outputText.value = Utils.printable(output.data.result, true);
|
||||
outputText.scroll(0, 0);
|
||||
outputHtml.innerHTML = "";
|
||||
|
||||
lines = output.data.result.count("\n") + 1;
|
||||
|
@ -745,6 +742,9 @@ class OutputWaiter {
|
|||
|
||||
this.app.debounce(this.set, 50, "setOutput", this, [inputNum])();
|
||||
|
||||
document.getElementById("output-html").scroll(0, 0);
|
||||
document.getElementById("output-text").scroll(0, 0);
|
||||
|
||||
if (changeInput) {
|
||||
this.manager.input.changeTab(inputNum, false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue