Disable text selection on Dashboard

Hello... I'm Working with a Node-Red Dashboard, my app is running on a Kiosk on Raspbian
My Raspberry pi board includes a Touch Screen.

¿Is there a way to include CSS in the dashboard to disable text selection and also disable the drag-and-drop feature?

I want to prevent users from accidentally doing this:

Thanks!

Yes. Use a ui_template node set to "add to head" then enter a style tag with your CSS inside.

OK, thanks for the answer, Steve.

I am not an expert in HTML, CSS and JavaScript
I understand that with an "ui_template" I can apply styles to all the HTML content inside it, but I don't know how to apply styles to a component like the dashboard.

Selectable text.

Unselectable text.

.noselect {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

Source of the code: https://stackoverflow.com/questions/826782/how-to-disable-text-selection-highlighting

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.