zero01101 / openOutpaint

local offline javascript and html canvas outpainting gizmo for stable diffusion webUI API 🐠
MIT License
503 stars 44 forks source link

fix leave-page alert #152

Closed vladmandic closed 1 year ago

vladmandic commented 1 year ago

dont register global onbefore onbeforeunload as it triggers alert always
even if outpaint is not busy, it will always block closing of the page.

and in case of automatic1111 extension, it will block closing of automatic even if openoutpaint tab is not active (and never was)

i've implemented generate as function so it takes care of that as needed.

seijihariki commented 1 year ago

Thank you! This is something that was bothering me.

vladmandic commented 1 year ago

Everything seems okay. Hadn't thought of setting onbeforeunload! Will just change the log message.

feel free to modify, this is just a quick fix (and i've just removed debug message in the follow-up commit)

seijihariki commented 1 year ago

Oh, okay! Was wondering there the debug was on my local branch!

seijihariki commented 1 year ago

Again, thanks for your contribution! Will get to your pull on the extension as well.