mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-01-26 19:19:57 +00:00
fix: Add fallback to applySettingsButton var
Need due to layout change in recent webui update
269f6e8676
This commit is contained in:
@@ -1059,7 +1059,10 @@ async function setup() {
|
||||
let textAreas = getTextAreas();
|
||||
|
||||
// Add event listener to apply settings button so we can mirror the changes to our internal config
|
||||
let applySettingsButton = gradioApp().querySelector("#tab_settings > div > .gr-button-primary");
|
||||
let applySettingsButton = (
|
||||
gradioApp().querySelector("#tab_settings > div > .gr-button-primary") ||
|
||||
gradioApp().querySelector("#tab_settings > div > div > #settings_submit")
|
||||
);
|
||||
applySettingsButton.addEventListener("click", () => {
|
||||
// Wait 500ms to make sure the settings have been applied to the webui opts object
|
||||
setTimeout(async () => {
|
||||
@@ -1158,4 +1161,4 @@ onUiUpdate(async () => {
|
||||
await syncOptions();
|
||||
// Rest of setup
|
||||
setup();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user