mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-28 03:47:37 +03:00
feat(core): add app-region: drag
to data-tauri-drag-region
(#9789)
This commit is contained in:
parent
0b690f242f
commit
ae6b13dfc0
5
.changes/app-region-drag.md
Normal file
5
.changes/app-region-drag.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch:feat
|
||||
---
|
||||
|
||||
Add `app-region: drag` to HTML elements with `data-tauri-drag-region` on Windows, only WebView2 123+, which should fix dragging using touch.
|
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -4885,9 +4885,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wry"
|
||||
version = "0.39.3"
|
||||
version = "0.40.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e180ac2740d6cb4d5cec0abf63eacbea90f1b7e5e3803043b13c1c84c4b7884"
|
||||
checksum = "7cd42682bad8d1efd0e0d0593770c602c13b8922bb1ca705cb845967de81bbc4"
|
||||
dependencies = [
|
||||
"base64 0.22.0",
|
||||
"block",
|
||||
|
@ -13,7 +13,7 @@ edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
wry = { version = "0.39.3", default-features = false, features = [ "drag-drop", "protocol", "os-webview" ] }
|
||||
wry = { version = "0.40", default-features = false, features = [ "drag-drop", "protocol", "os-webview" ] }
|
||||
tao = { version = "0.28", default-features = false, features = [ "rwh_06" ] }
|
||||
tauri-runtime = { version = "2.0.0-beta.16", path = "../tauri-runtime" }
|
||||
tauri-utils = { version = "2.0.0-beta.15", path = "../tauri-utils" }
|
||||
|
@ -63,4 +63,9 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
if (osName === 'windows' && 'adoptedStyleSheets' in document) {
|
||||
const sheet = new CSSStyleSheet()
|
||||
sheet.replaceSync('*[data-tauri-drag-region] { app-region: drag; }')
|
||||
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]
|
||||
}
|
||||
})()
|
||||
|
4
examples/api/src-tauri/Cargo.lock
generated
4
examples/api/src-tauri/Cargo.lock
generated
@ -4257,9 +4257,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wry"
|
||||
version = "0.39.5"
|
||||
version = "0.40.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7172fc76376d55d089c627a31a5b604b4ac372793fb5378d1c7ddf008703008"
|
||||
checksum = "7cd42682bad8d1efd0e0d0593770c602c13b8922bb1ca705cb845967de81bbc4"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"block",
|
||||
|
Loading…
Reference in New Issue
Block a user