focus-visible
focus-visible copied to clipboard
Is there a way to remove the .focus-visible class name when clicking.
Hi there,
First thing, thanks for this awesome polyfill. Just want to ask a quick question if there's a way you can remove the class name focus-visible
on this library. See the image below.
Tabbing works great, but when clicking on the Warn
for example I want to remove the .focus-visible
class name.
hi @kevzlou7979 I'm not sure I'm understanding what's happening in the video, do you have some sample code you can share?
@robdodson I see this function:
function onPointerDown(e) {
hadKeyboardEvent = false;
}
That doesn't remove the .focus-visible class, so I guess if I have the focus on an input and I click on a paragraph the input will still have .focus-visible, which seems wrong?
Edit: Though I see later on there's an onFocus function which could potentially reset the focus, but it doesn't seem to reset it, like if I click on the body the input is not in focus anymore, but the body is ignored by this polyfill.
Sorry I'm still not sure I understand the actual bug. Could y'all share a codesandbox or something with steps to reproduce the issue?
Sorry I was just looking at the code, I probably just read it wrong. I'm not sure what the problem that @kevzlou7979 was reporting actually is.