tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
84.35k stars 2.53k forks source link

[bug] window.find can not work #6816

Open zhouyangtingwen opened 1 year ago

zhouyangtingwen commented 1 year ago

Describe the bug

window.find can not work in tauri, but in chrome, window.find can work

Reproduction

No response

Expected behavior

No response

Platform and versions

$ tauri info

Environment
  › OS: Mac OS 12.3.1 X64
  › Node.js: 14.18.0
  › npm: 6.14.15
  › pnpm: Not installed!
  › yarn: 1.22.19
  › rustup: 1.25.2
  › rustc: 1.68.2
  › cargo: 1.68.2
  › Rust toolchain: stable-x86_64-apple-darwin 

Packages
  › @tauri-apps/cli [NPM]: 1.2.1
  › @tauri-apps/api [NPM]: 1.2.0
  › tauri [RUST]: 1.2.4,
  › tauri-build [RUST]: 1.2.1,
  › tao [RUST]: 0.15.8,
  › wry [RUST]: 0.23.4,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../dist
  › devPath: http://localhost:1420/
  › framework: Vue.js

App directory structure
  ├─ dist
  ├─ node_modules
  ├─ public
  ├─ .github
  ├─ src-tauri
  ├─ .git
  └─ src

Stack trace

No response

Additional context

No response

amrbashir commented 1 year ago

This method is not a standard see https://developer.mozilla.org/en-US/docs/Web/API/Window/find so don't expect it to work well especially on macOS and Linux.

also see https://github.com/tauri-apps/wry/issues/585 and https://github.com/tauri-apps/wry/pull/593 for our attempts to solve this.