masakudamatsu / triangulum-color-picker

A front-end web app to pick a tint/tone/shade of hues more logically and more intuitively than the standard color pickers
https://triangulum.netlify.app
MIT License
2 stars 1 forks source link

Select all digits in RGB/HSL value fields when the user clicks them #160

Open masakudamatsu opened 3 years ago

masakudamatsu commented 3 years ago

Problem

On a mobile device, tapping RGB/HSL value fields puts the input cursor rather randomly. When the cursor ends up at the beginning, it is not easy to change the current value.

Solution

The input element has a method .select(), which selects everything in the field.