RisuAI
RisuAI copied to clipboard
import character & load backup locally not working on Safari / Tauri on Mac OS
File selector does not appear when "import character" or "load backup locally" button clicked.
Safari security policy seems to be the cause of this issue - input.click() is not working when display='none' or that isn't the direct result of user interactions. Refer to Stack Overflow comment: https://stackoverflow.com/questions/26501221/calling-click-event-of-input-doesnt-work-in-safari#:~:text=Click%20event%20in%20safari%20on%20input%20type%20file%20will%20work%20if%20it%20is%20not%20hidden%20and%20click()%20is%20called%20out%20of%20user%20interaction%20(e.g%20inside%20onclick%20handler%20etc)
I've tried to fix it, but it requires too many huge structural changes.
I've noticed the same issue with the Linux AppImage with the file selector not showing up to load a backup locally. Importing characters does work, though. No Safari in this case, of course, so I'm not sure if the cause is related or not.
I guess it is related because both use webkit to render pages.
Safari uses webkit natively, and linux build uses libwebkit2gtk.
I experience same issues from both macOS dmg build and Linux rpm build, version 149 and 149.1