* claim: #5227 * Web: leave Ctrl+Tab and Ctrl+Shift+Tab to the browser (#5227) eframe cancels the default action of every Tab keydown on its canvas (egui moves focus with Tab), so browsers that let a page cancel their shortcuts, such as Vivaldi, could not switch tabs while SolidCraft had the keyboard. A capture listener on the window now stops Ctrl+Tab and Ctrl+Shift+Tab before they reach the canvas, without cancelling them, so the browser acts on them as usual. Plain Tab and Shift+Tab still move between the app's fields. Desktop builds are unchanged. web-api-test checks it in headless Chrome: Ctrl+Tab and Ctrl+Shift+Tab keydowns are not cancelled, Tab still is. --------- Co-authored-by: MateuszSychXpl <151755914+MateuszSychXpl@users.noreply.github.com>
35 lines
1.3 KiB
TOML
35 lines
1.3 KiB
TOML
[package]
|
|
name = "solidcraft-web"
|
|
description = "SolidCraft in the browser (eframe web runner, WebGPU with WebGL2 fallback)"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[[bin]]
|
|
name = "solidcraft-web"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
solidcraft-engine = { workspace = true }
|
|
solidcraft-ui-egui = { workspace = true }
|
|
egui = { workspace = true }
|
|
log = { workspace = true }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] }
|
|
wasm-bindgen = "0.2"
|
|
wasm-bindgen-futures = "0.4"
|
|
js-sys = "0.3"
|
|
serde_json = { workspace = true }
|
|
web-sys = { version = "0.3", features = [
|
|
"Window", "Document", "Element", "HtmlElement", "HtmlCanvasElement", "Location", "Navigator", "StorageManager",
|
|
"FileSystemHandle", "FileSystemDirectoryHandle", "FileSystemFileHandle", "FileSystemGetFileOptions", "FileSystemWritableFileStream",
|
|
"WritableStream", "File", "FileList", "Blob", "BlobPropertyBag", "Url", "HtmlAnchorElement", "HtmlInputElement", "Storage",
|
|
"IdbFactory", "IdbDatabase", "IdbObjectStore", "IdbOpenDbRequest", "IdbRequest", "IdbTransaction", "IdbTransactionMode",
|
|
"BeforeUnloadEvent", "Event", "EventTarget", "KeyboardEvent", "Response", "MediaQueryList", "Gamepad", "Performance",
|
|
] }
|