Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to remove the .focus-visible class name when clicking. #236

Open
kevzlou7979 opened this issue Aug 24, 2020 · 5 comments
Open

Comments

@kevzlou7979
Copy link

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.

issue1

@kevzlou7979
Copy link
Author

Tabbing works great, but when clicking on the Warn for example I want to remove the .focus-visible class name.

@robdodson
Copy link
Collaborator

hi @kevzlou7979 I'm not sure I'm understanding what's happening in the video, do you have some sample code you can share?

@fabiospampinato
Copy link

fabiospampinato commented Sep 5, 2022

@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.

@robdodson
Copy link
Collaborator

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?

@fabiospampinato
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants