mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-23 00:18:20 +01:00
Remove the awkward "Tab" keyboard shortcut
This commit is contained in:
parent
577a8cd3ee
commit
564a3e1553
14
js/main.js
14
js/main.js
@ -98,20 +98,6 @@ document.addEventListener("keydown", function(event) {
|
|||||||
document.getElementById("Impersonate").click();
|
document.getElementById("Impersonate").click();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Switch between tabs on Tab
|
|
||||||
else if (!event.ctrlKey && !event.shiftKey && !event.altKey && !event.metaKey && event.key === "Tab") {
|
|
||||||
event.preventDefault();
|
|
||||||
var parametersButton = document.getElementById("parameters-button");
|
|
||||||
var parentContainer = parametersButton.parentNode;
|
|
||||||
var selectedChild = parentContainer.querySelector(".selected");
|
|
||||||
|
|
||||||
if (selectedChild.id == "parameters-button") {
|
|
||||||
document.getElementById(previousTabId).click();
|
|
||||||
} else {
|
|
||||||
previousTabId = selectedChild.id;
|
|
||||||
parametersButton.click();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user