You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
App directory structure
├─ src
├─ src-tauri
├─ .vscode
├─ public
├─ node_modules
├─ dist
├─ settings
└─ about
Stack trace
No response
Additional context
Current workaround:
voidlisten('tauri://window-created',(event: Event<{label: string}>)=>{// Can't immediately access to the created window by `WebviewWindow.getByLabel`setTimeout(()=>{constcreatedWindow=WebviewWindow.getByLabel(event.payload.label)if(createdWindow!==null){onCreateWindow(createdWindow)}},100)})
The text was updated successfully, but these errors were encountered:
Tauri fires event listeners in reverse order, so our own tauri://window-created listener is the last to execute. This commit changes the listen JS code to keep our own listener as the last one in the array, so the metadata is updated before user code is executed.
Describe the bug
Can't immediately access to the created window by
WebviewWindow.getByLabel
in event listener (tauri://window-created
).Reproduction
tauri://window-created
event listener on the current application window:Ctrl+Shift+I
null
Expected behavior
Platform and versions
❯ yarn tauri info
Environment
› OS: Arch Linux Unknown X64
› Node.js: 18.8.0
› npm: 8.18.0
› pnpm: Not installed!
› yarn: 3.2.2
› rustup: 1.24.3
› rustc: 1.59.0
› cargo: 1.59.0
› Rust toolchain: stable-x86_64-unknown-linux-gnu
Packages
WARNING: no lock files found, defaulting to npm
› @tauri-apps/cli [NPM]: 1.0.5
› @tauri-apps/api [NPM]: 1.0.2
› tauri [RUST]: 1.0.5,
› tauri-build [RUST]: 1.0.4,
› tao [RUST]: 0.12.2,
› wry [RUST]: 0.19.0,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
› framework: Vue.js
App directory structure
├─ src
├─ src-tauri
├─ .vscode
├─ public
├─ node_modules
├─ dist
├─ settings
└─ about
Stack trace
No response
Additional context
Current workaround:
The text was updated successfully, but these errors were encountered: