Skip to content

Commit

Permalink
Revert "Fix node searchbox default value setting (#150)" (#151)
Browse files Browse the repository at this point in the history
This reverts commit 3dfef8a.
  • Loading branch information
huchenlei authored Jul 18, 2024
1 parent 3dfef8a commit bb02f93
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion browser_tests/nodeSearchBox.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import { expect } from "@playwright/test";
import { comfyPageFixture as test} from "./ComfyPage";
import { ComfyPage, comfyPageFixture } from "./ComfyPage";

export const test = comfyPageFixture.extend<{ comfyPage: ComfyPage }>({
comfyPage: async ({ comfyPage }, use) => {
await comfyPage.page.evaluate(async () => {
await window["app"].ui.settings.setSettingValueAsync(
"Comfy.NodeSearchBoxImpl",
"default"
);
});
await use(comfyPage);
},
});

test.describe("Node search box", () => {
test("Can trigger on empty canvas double click", async ({ comfyPage }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,9 @@ export class ComfyUI {
options: ["default", "litegraph (legacy)"],
defaultValue: "default",
onChange: (value?: string) => {
if (value === undefined) return;
if (!app.canvas) return;

value = value || "default";
const useLitegraphSearch = value === "litegraph (legacy)";
app.canvas.allow_searchbox = useLitegraphSearch;
document.dispatchEvent(
Expand Down

0 comments on commit bb02f93

Please sign in to comment.