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
MouseEvent.MovementX and MouseEvent.MovementY should be equal to the difference between the current mouse position and the mouse position during the previous MouseEvent, but in this case, they seem to be equal to coordinates of the cursor on the page (i.e. the same as pageX and pageY.)
Reproduction
Create a project with create-tauri-app using the svelte-ts template
Create two files App.svelte and Draggable.svelte with the following contents:
Warning: Browsers use different units for movementX and screenX than what the specification defines. Depending on the browser and operating system, the movementX units may be a physical pixel, a logical pixel, or a CSS pixel.
So it seems that this property is not reliable anyways and you should compute it yourself, MDN also gives you how to compute it properly
Describe the bug
MouseEvent.MovementX and MouseEvent.MovementY should be equal to the difference between the current mouse position and the mouse position during the previous MouseEvent, but in this case, they seem to be equal to coordinates of the cursor on the page (i.e. the same as pageX and pageY.)
Reproduction
App.svelte:
Draggable.svelte:
Expected behavior
The text should follow the cursor instead of drifting off the screen
Platform and versions
Environment
› OS: Arch Linux Unknown X64
› Node.js: 18.7.0
› npm: Not installed!
› pnpm: 7.9.4
› yarn: Not installed!
› rustup: Not installed!
› rustc: 1.63.0
› cargo: 1.63.0
› Rust toolchain:
Packages
› @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: Svelte
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: