How to Disable Long Press Copy/Character Selection in HTML for Tablet Display

Asked 2 years ago, Updated 2 years ago, 35 views

When developing the Pepper Robo app, I would like to disable the long press copy and character selection when displaying the screen on the tablet. What should I do?

I don't want to disable the touch because I also place text input parts and buttons on the same screen.
I want to keep touch enabled and disable only long press.
Please tell me how.

html pepper

2022-09-29 21:33

1 Answers

By filling in the CSS below, I was able to disable long-press character selection while keeping the touch of the button enabled.

body{
    - webkit-user-select: none;
}


2022-09-29 21:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.