Closed stolinski closed 3 weeks ago
Some additional information. I uncommented decorum-page-load event received
and it is logging. But also when I tried your example within the /example dir, it did work correctly.
Another small update. I can confirm that titlebar.js is not being run for some reason. I added the script manually to my index.html file and drag is now working without issue since the element wasn't being created. So not sure what's changed here or what I'm missing but
let script_tb = include_str!("js/titlebar.js");
win2.eval(script_tb)
.unwrap_or_else(|e| println!("decorum error: {:?}", e));
Seems to be the issue for some reason.
Do you get any errors printed on the console or anything? I don't get anything at all.
Edit:
I Had to add withGlobalTauri: True
to the tauri config. It also logs error to the dev tools console but I was kinda blind I guess
@stolinski did you try @metkm's solution? Since the titlebar js is not working it's very likely what he suggested or a permissions issue.
@clearlysid I faced the same issue. I can confirm adding the withGlobalTauri: True
to the tauri config solve the problem. According to v2 doc, it seems window.__TAURI__
is not exposed anymore unless you set withGlobalTauri: True
.
Thanks for the confirmation! This instruction is now also added to the docs, so hopefully it will be clearer to folks using it. In the meantime, I will explore options to try and remove this limitation. Cheers!
I made a reproduction here: https://github.com/stolinski/decorum-reproduction
I tried to follow your /example code exactly, but also tried the code within the readme. Not sure what I'm missing here, but I the drag areas aren't within the DOM.
If you have any ideas, lmk, I've tried tweaking a ton to get it like your example, and I'm wondering if it's something sveltekit related or something that's changed from beta to rc.
Thank you for your work!