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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

setReadonly/setDisabled will blur any element that is not related to Tagify #1328

Closed
3 tasks done
Maxime117 opened this issue Apr 25, 2024 · 0 comments
Closed
3 tasks done
Labels

Comments

@Maxime117
Copy link

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

馃挜 Demo Page

https://jsbin.com/yododahodi/edit?html,js,output

Explanation

  • What is the expected behavior?
    It should verify if document.activeElement is an element related to tagify before calling blur()

  • What is happening instead?
    The blur() method is called on document.activeElement regardless of whether the active element is part of Tagify. This leads to a scenario where any focused element will lose focus, disrupting user interactions outside of the Tagify context.

document.activeElement.blur() // exit possible edit-mode

I'm unsure what this line is meant to do.
I guess it's here to exit edit-mode on tags, as the tagify input should loose focus naturally when it has the readonly/disabled attribute.

@yairEO yairEO added the Bug label Apr 25, 2024
@yairEO yairEO closed this as completed in 69eb547 Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants