consul icon indicating copy to clipboard operation
consul copied to clipboard

Consul web-ui services search-bar, when start typing, loses focus on every character input

Open dmclf opened this issue 2 years ago • 3 comments

Overview of the Issue

Consul web-ui services search-bar, when start typing, loses focus on every character input. so searching for... for example: hashicorp (9 characters) would require clicking with mouse back to the search-bar to focus 9 times)

Reproduction Steps

Steps to reproduce this issue:

  1. Go to Consul-UI
  2. Go to services
  3. Type something in the search-bar. image
  4. try to type hashicorp in one stretch. image
  5. above in my case requires regaining focus after every character input.

Consul info for Server

build:
	prerelease = 
	revision = 9bcafa24
	version = 1.17.1
	version_metadata = 
runtime:
	arch = amd64
	cpu_count = 1
	goroutines = 1227
	max_procs = 1
	os = linux
	version = go1.20.12
runtime:
	arch = arm64
	cpu_count = 2
	goroutines = 498
	max_procs = 2
	os = linux
	version = go1.20.12

Operating system and Environment details

OS: Ubuntu 22.04.3 Architecture: x86_64 + aarch64

dpkg info:

ii  consul         1.17.1-1     amd64        Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
ii  consul         1.17.1-1     arm64        Consul is a distributed, highly available, and data ce>

dmclf avatar Jan 08 '24 07:01 dmclf

Thanks for reporting this @dmclf. I looked into this. Here's what I have found. In the PR merged by @chris-hut - https://github.com/hashicorp/consul/pull/19226/

A dependency was introduced named - ember-a11y-refocus - because of hashicorp/design-system-components - https://github.com/hashicorp/consul/pull/19226/files#diff-3a968206d6de2fecfc5dacd7d94bab7744c9f5d5c999a816164d95cbc135c316R1871-R1888

In this dependency there is a js code which actually changes the focus to a div with id - ember-a11y-refocus-nav-message

I have opened a PR for your review if this change sounds ok. - https://github.com/hashicorp/consul/pull/20111

Screenshot 2024-01-08 at 4 00 13 PM

cc @WenInCode @chris-hut

asheshvidyut avatar Jan 08 '24 10:01 asheshvidyut

Thank you for the report, and thank you @absolutelightning with the proposed fix. I will take some time to go over this afternoon.

Much appreciated!

WenInCode avatar Jan 08 '24 16:01 WenInCode

The fix for this has been merged and will be released as part of the upcoming 1.17 patch release.

WenInCode avatar Jan 09 '24 20:01 WenInCode