Describe the bug
If I create a new window from a WebView and attach a listener to it, the events that the listener receives are actually from the parent window.
e.g. if I listen to tauri://move on the child window, the listener fires when the parent window moves.
Reproduction
- Run this code in the WebView
function createWindow() {
const label = Math.random().toString();
const webview = new WebviewWindow(label);
windowMap[label] = webview;
webview.once('tauri://error', function () {
onMessage("Error creating new webview")
});
webview.listen('tauri://move', event => console.log(event));
}
- Move the child window
- Nothing appears in the console logs
- Move the parent window
- Move events are logged in the console.
Expected behavior
I would expect to see the move events of the child window being logged to the console. Not those of the parent.
Platform and versions
tauri-apps/tauri@next 2b9e6ccc38836b27a3850faa697e845325a3866d
Operating System - Mac OS, version 11.6.2 X64
Node.js environment
Node.js - 14.18.2
@tauri-apps/cli - 1.0.0-beta.10
@tauri-apps/api - 1.0.0-beta.8
Global packages
npm - 6.14.15
pnpm - Not installed
yarn - 1.22.17
Rust environment
rustc - 1.57.0
cargo - 1.57.0
Rust environment
rustup - 1.24.3
rustc - 1.57.0
cargo - 1.57.0
toolchain - stable-x86_64-apple-darwin (default)
App directory structure
/dist
/node_modules
/public
/src-tauri
/src
App
tauri.rs - 1.0.0-beta.8
build-type - bundle
CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: asset: customprotocol: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
distDir - ../dist
devPath - http://localhost:5000/
framework - Svelte
Stack trace
No response
Additional context
No response
Describe the bug
If I create a new window from a WebView and attach a listener to it, the events that the listener receives are actually from the parent window.
e.g. if I listen to
tauri://moveon the child window, the listener fires when the parent window moves.Reproduction
Expected behavior
I would expect to see the move events of the child window being logged to the console. Not those of the parent.
Platform and versions
Stack trace
No response
Additional context
No response