#Missing/Broken CSS properties
1 messages · Page 1 of 1 (latest)
They are working if I put them on * {}
But other than that the 2 css properties are highly broken, sometimes only moving the cursor, sometimes selecting, very odd behavior
How are you using them? I just tried pointer-events: none on a button and it seemed to work
Like normal, I put it on the div and its not applying
Or works in a very broken way, like instead of preventing selecting it would only move cursor to text but not select
Some weird aah behavior
Which OS are you seeing this behaviour on?
For Linux and macOS, user-select requires the vendor-specific prefix of -webkit-. Try the following: pointer-events: none; -webkit-user-select: none; user-select: none;
Windows x86 64
Can you share the output of tauri info so I know which version this applies to?
[✔] Environment
- OS: Windows 10.0.19045 X64
✔ WebView2: 121.0.2277.128
✔ MSVC:
- Visual Studio Build Tools 2019
- Visual Studio Community 2022
✔ rustc: 1.76.0 (07dca489a 2024-02-04)
✔ cargo: 1.76.0 (c84b36747 2024-01-18)
✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (environment override by RUSTUP_TOOLCHAIN)
- node: 18.16.1
- pnpm: 8.15.1
- npm: 9.5.1
[-] Packages
- tauri [RUST]: 1.5.4
- tauri-build [RUST]: 1.5.1
- wry [RUST]: 0.24.7
- tao [RUST]: 0.16.7
- tauri-cli [RUST]: 1.5.9
- @tauri-apps/api [NPM]: 1.5.3
- @tauri-apps/cli [NPM]: 1.5.9 (outdated, latest: 1.5.10)
[-] App
- build-type: bundle
- CSP: unset
- distDir: ../dist
- devPath: http://localhost:1420/
- bundler: Vite
Yeah I need it to work ASAP this causes me so many issues I can't even keep working
Does it behave the same in Edge or Chrome?
I was unable to replicate the problem. Can you try with the following examples or provide the code that didn't work for you?
https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events#examples
https://developer.mozilla.org/en-US/docs/Web/CSS/user-select#examples
Wait, why am I able to select the text with pointer-events set to none
Shouldn't the cursor event go through
Same thing edge and brave browser
What is going on
Well I guess it doesn't prevent text selection, but that's a detail, user-select: none; is the real issue
I wasn't able to select anything with user-select: none; in the examples I linked.
Even a select all (context menu and keyboard shortcut) would avoid the Hey, you can't select this text!.
I first set background:red; so you can see which div I try to remove the selecting ability from
Then I add user-select:none; but it doesn't work
I tried the same just now with the MDN examples by making it .unselectable:nth-child(even) and duplicating the HTML for 40 lines and it still behaves as expected. Can you try a basic boilerplate project with pnpm create tauri-app?
I tried so many things I have no idea what is wrong
I just had the issue again on this project, another project https://github.com/AuracleTech/hotkeys
if I add user-select: none; to #hotkeys_tip I can still select it
Its a small project you could test it easily
Its basically a module
Can you try validating your install of WebView2? I was using the same version you posted so I wonder if something is wrong with the install.
How to do that
Settings > Apps > search for WebView2 and click > Modify.
Might not be correct, I will need a couple of minutes to start Windows.
I know trying to launch the installer a second time will bring up the verify option.
aight
I repaired, that was my only option
It finished repairing while everything was closed
Yeah no I still can select even if its directly on the highest level of my div
Nevermind the project "hotkeys" by the way, it's a simple css mistake on that one, Its old code im reworking 4 years later
But this one, my biggest one, issue still there, no idea how and why
Is your project source available somewhere?
I don't think so lemme init repo
Oh I guess it was
project contains "panels" a system like windows's windows
and hotkeys (the other project im making separate) for now still merged
and editor, where my issue arises
feedback so far
I see nothing wrong with the CSS but figuring out what the final HTML looks like from source is difficult.
Will need a bit to fix my build environment.
and made it into html instead of dynamic aswell
so now its only those 2 files where issues still occurs
Please don't upload binary files that don't preview. It's safer to make a branch of your repository.
there s no bin
The zip file.
It's a binary file that Discord doesn't show a preview for like it does for images and text files. The Tauri Discord mods and admins can't verify that the file is safe.
then I guess just these 2 are necessary anymore anyway