#Missing/Broken CSS properties

1 messages · Page 1 of 1 (latest)

sonic sedge
#
pointer-events: none;
user-select: none;

There 2 CSS properties aren't working properly

sonic sedge
#

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

dawn dragon
#

How are you using them? I just tried pointer-events: none on a button and it seemed to work

sonic sedge
#

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

sly yarrow
#

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;

sonic sedge
sly yarrow
sonic sedge
#
[✔] 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
sonic sedge
#

Yeah I need it to work ASAP this causes me so many issues I can't even keep working

sly yarrow
#

Does it behave the same in Edge or Chrome?

sly yarrow
sonic sedge
#

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

sly yarrow
#

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!.

sonic sedge
#

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

sly yarrow
#

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?

sonic sedge
#

I tried so many things I have no idea what is wrong

#

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

sly yarrow
#

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.

sonic sedge
#

How to do that

sly yarrow
#

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.

sonic sedge
#

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

sly yarrow
#

Is your project source available somewhere?

sonic sedge
#

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

sonic sedge
#

feedback so far

sly yarrow
#

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.

sonic sedge
#

and made it into html instead of dynamic aswell

#

so now its only those 2 files where issues still occurs

sly yarrow
#

Please don't upload binary files that don't preview. It's safer to make a branch of your repository.

sonic sedge
#

there s no bin

sly yarrow
#

The zip file.

sonic sedge
#

i deleted target of tauri and npm modules

#

zip file is not a bin

sly yarrow
#

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.

sonic sedge
sonic sedge
#

Ok I found, contenteditable overrides user-select

#

All this for that, oh man