Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] User selection client rect #12075

Open
DaiYuANg opened this issue Dec 30, 2024 · 0 comments
Open

[bug] User selection client rect #12075

DaiYuANg opened this issue Dec 30, 2024 · 0 comments
Labels
platform: macOS status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@DaiYuANg
Copy link

Describe the bug

This code for get user input position on browser also I test on chrome and safari in story book it works fine

window.getSelection()?.getRangeAt(0)?.getBoundingClientRect();

But in tauri the result not expected it will offset by a certain distance different with chrome and safari

It is on chrome with storybook
截屏2024-12-30 23 03 43

it is on safari with storybook
截屏2024-12-30 23 06 03

it is on tauri
截屏2024-12-30 23 06 37

Reproduction

I test on new a vite project with tauri just write this

window.getSelection()?.getRangeAt(0)?.getBoundingClientRect();

And see what different on normal browser and tauri

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Mac OS 15.2.0 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.83.0 (90b35a623 2024-11-26)
    ✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
    ✔ rustup: 1.27.1 (2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 22.8.0
    - pnpm: 9.10.0
    - npm: 10.8.2
    - bun: 1.1.42
    - deno: deno 2.1.4

[-] Packages
    - tauri 🦀: 2.1.1
    - tauri-build 🦀: 2.0.3
    - wry 🦀: 0.47.2
    - tao 🦀: 0.30.8
    - cargo-tauri 🦀: 1.0.5
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli : 2.1.0

[-] Plugins
    - tauri-plugin-os 🦀: 2.2.0
    - @tauri-apps/plugin-os : not installed!
    - tauri-plugin-log 🦀: 2.2.0
    - @tauri-apps/plugin-log : not installed!
    - tauri-plugin-fs 🦀: 2.2.0
    - @tauri-apps/plugin-fs : not installed!

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace

No response

Additional context

No response

@DaiYuANg DaiYuANg added status: needs triage This issue needs to triage, applied to new issues type: bug labels Dec 30, 2024
@DaiYuANg DaiYuANg changed the title [bug] [bug] User selection client rect Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: macOS status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants