tryphotino / photino.NET

https://tryphotino.io
Apache License 2.0
884 stars 73 forks source link

All Text is "Editable" and Shows Text Cursor. #173

Closed reinitd closed 6 months ago

reinitd commented 7 months ago

OS: Arch Rolling (btw :trollface:), this also persists on WSL2. WM: i3 Display Manager: LightDM

A friend and I were checking out Photino.NET (very cool, we like it a lot). We assume GTK is at fault, but we aren't certain. Everything that has text is a non-editable text box (has a caret) and hovering shows a text cursor.

I've tried CSS to fix this, but could only make the caret transparent, with cursor: text; still visible. CSS attempted:

h1, h2, h3, h4, h5, h6, p, b, strong, i, a, div {
    user-select: none !important;
    -webkit-user-select: none !important;
    caret-color: transparent !important;
    cursor: normal !important; /* Doesn't fix the text cursor */
}

This isn't a problem on Windows. I cannot add a picture as maim hides my cursor when I take a photo.

reinitd commented 7 months ago

It seems I forgot how to CSS. cursor: default; fixes it, but it's still weird that this happens.

Also, the !important flags are not required. Here is the updated CSS snippet to fix this:

h1,
h2,
h3,
h4,
h5,
h6,
p,
b,
strong,
i,
a,
div {
    /* Linux fix. */
    user-select: none;
    -webkit-user-select: none;
    caret-color: transparent;
    cursor: default;
}
philippjbauer commented 6 months ago

We can't reproduce the issue on our end. In a VM using Ubuntu 22.04 it behaves as in the recording. Note that the cursor of the host system is overlaid on the text selection cursor which in itself is the expected behavior inside of a web control.

https://github.com/tryphotino/photino.NET/assets/3707196/591d23ae-197d-49ee-9ba0-db0072d75e20