spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

fix(number-field): select full value when using Tab to enter a field with a unit

Open Westbrook opened this issue 1 year ago • 3 comments
trafficstars

Description

Keyboard based focus of Number Fields with units should select all of the available content.

Related issue(s)

  • fixes #3282

How has this been tested?

  • [ ] Test case 1
    1. Go here
    2. Use Tab to focus the Number Field, see that all of the content is selected
  • [ ] Test case 2
    1. Go here
    2. Click to focus the Number Field
    3. See that there is no selection in the Number Field

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)

Checklist

  • [x] I have signed the Adobe Open Source CLA.
  • [x] My code follows the code style of this project.
  • [ ] If my change required a change to the documentation, I have updated the documentation in this pull request.
  • [x] I have read the CONTRIBUTING document.
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

Westbrook avatar Apr 29 '24 18:04 Westbrook

Branch preview

Visual regression test results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

github-actions[bot] avatar Apr 29 '24 18:04 github-actions[bot]

Lighthouse scores

Category Latest (report) Main (report) Branch (report)
Performance 0.99 0.99 0.99
Accessibility 1 1 1
Best Practices 1 1 1
SEO 1 0.92 0.92
PWA 1 1 1
What is this?

Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on main ("Main"). Higher scores are better, but note that the SEO scores on Netlify URLs are artifically constrained to 0.92.

Transfer Size

Category Latest Main Branch
Total 221.05 kB 210.404 kB 210.169 kB 🏆
Scripts 53.31 kB 48.19 kB 47.999 kB 🏆
Stylesheet 34.854 kB 30.317 kB 🏆 30.381 kB
Document 5.892 kB 5.291 kB 5.193 kB 🏆
Font 126.994 kB 126.606 kB 126.596 kB 🏆

Request Count

Category Latest Main Branch
Total 45 45 45
Scripts 37 37 37
Stylesheet 5 5 5
Document 1 1 1
Font 2 2 2

github-actions[bot] avatar Apr 29 '24 18:04 github-actions[bot]

Tachometer results

Chrome

color-field permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 487 kB 41.06ms - 42.27ms - faster ✔
2% - 7%
1.04ms - 3.00ms
branch 475 kB 42.91ms - 44.46ms slower ❌
2% - 7%
1.04ms - 3.00ms
-

combobox permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 36.49ms - 37.52ms - faster ✔
3% - 6%
1.11ms - 2.52ms
branch 697 kB 38.33ms - 39.30ms slower ❌
3% - 7%
1.11ms - 2.52ms
-

light-dom-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 398.81ms - 406.75ms - faster ✔
3% - 7%
13.82ms - 29.87ms
branch 697 kB 417.65ms - 431.60ms slower ❌
3% - 7%
13.82ms - 29.87ms
-

number-field permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 523 kB 67.29ms - 68.90ms - faster ✔
10% - 13%
7.43ms - 10.08ms
branch 511 kB 75.80ms - 77.90ms slower ❌
11% - 15%
7.43ms - 10.08ms
-

search permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 471 kB 39.24ms - 40.53ms - faster ✔
3% - 7%
1.17ms - 3.01ms
branch 459 kB 41.32ms - 42.63ms slower ❌
3% - 8%
1.17ms - 3.01ms
-

slider permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 480 kB 75.57ms - 78.47ms - faster ✔
2% - 6%
1.50ms - 5.15ms
branch 467 kB 79.23ms - 81.45ms slower ❌
2% - 7%
1.50ms - 5.15ms
-

textfield permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 432 kB 24.21ms - 24.95ms - faster ✔
8% - 12%
2.28ms - 3.40ms
branch 420 kB 27.00ms - 27.84ms slower ❌
9% - 14%
2.28ms - 3.40ms
-
Firefox

color-field permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 495 kB 75.84ms - 78.08ms - faster ✔
1% - 5%
0.77ms - 3.91ms
branch 483 kB 78.20ms - 80.40ms slower ❌
1% - 5%
0.77ms - 3.91ms
-

combobox permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 64.25ms - 70.87ms - slower ❌
7% - 18%
4.10ms - 10.94ms
branch 697 kB 59.17ms - 60.91ms faster ✔
7% - 16%
4.10ms - 10.94ms
-

light-dom-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 712.10ms - 736.46ms - slower ❌
3% - 6%
18.01ms - 43.83ms
branch 697 kB 689.09ms - 697.63ms faster ✔
3% - 6%
18.01ms - 43.83ms
-

number-field permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 523 kB 144.13ms - 150.31ms - faster ✔
6% - 12%
9.02ms - 19.58ms
branch 511 kB 157.24ms - 165.80ms slower ❌
6% - 13%
9.02ms - 19.58ms
-

search permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 471 kB 67.32ms - 73.12ms - faster ✔
1% - 12%
0.56ms - 8.84ms
branch 459 kB 71.97ms - 77.87ms slower ❌
1% - 13%
0.56ms - 8.84ms
-

slider permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 480 kB 162.21ms - 169.35ms - unsure 🔍
-5% - +1%
-8.87ms - +0.95ms
branch 467 kB 166.37ms - 173.11ms unsure 🔍
-1% - +5%
-0.95ms - +8.87ms
-

textfield permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 432 kB 48.84ms - 53.60ms - faster ✔
3% - 16%
1.52ms - 9.12ms
branch 420 kB 53.58ms - 59.50ms slower ❌
3% - 18%
1.52ms - 9.12ms
-

github-actions[bot] avatar Apr 29 '24 19:04 github-actions[bot]