Interactive controls that are represented by SVG icons can still trigger text selection or long-press selection gestures on touch devices (see attached screenshots as an example). Since these controls do not contain selectable text, this behavior is unnecessary and results in a less polished user experience.
Solution approaches
Disable text selection on interactive SVG controls.
Keep text selection enabled for regular text content.
Goals
Prevent accidental text selection on SVG controls.
Preserve text selection for normal text.
Improve the touch experience on mobile devices.
# Prevent text selection on SVG controls
## Problem
Interactive controls that are represented by SVG icons can still trigger text selection or long-press selection gestures on touch devices (see attached screenshots as an example). Since these controls do not contain selectable text, this behavior is unnecessary and results in a less polished user experience.
## Solution approaches
- Disable text selection on interactive SVG controls.
- Keep text selection enabled for regular text content.
## Goals
- Prevent accidental text selection on SVG controls.
- Preserve text selection for normal text.
- Improve the touch experience on mobile devices.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Prevent text selection on SVG controls
Problem
Interactive controls that are represented by SVG icons can still trigger text selection or long-press selection gestures on touch devices (see attached screenshots as an example). Since these controls do not contain selectable text, this behavior is unnecessary and results in a less polished user experience.
Solution approaches
Goals