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

🐞 - Link editor closes unexpectedly when provideAnimationsAsync() is used #1462

Open
hakimio opened this issue Sep 26, 2024 · 6 comments
Open
Labels
bug Something isn't working

Comments

@hakimio
Copy link
Contributor

hakimio commented Sep 26, 2024

Code Example URL

https://stackblitz.com/edit/angular-yqhfns-d8j69b?file=src%2Fmain.ts

Description

I have found a couple of issues in the latest version of the link editor.

  • A trivial one: PR fix: autofocus #1397 broke link editor's input autofocus. There is no more need to provide custom selector since [contenteditable] has been added upstream to the default query. (fixed)
  • A tricky one to reproduce and debug. If you provide Angular animations using the provideAnimationsAsync() introduced in Angular 17, link edit dropdown closes unexpectedly when trying to edit the link.

To reproduce the second issue I have provided stackblitz demo:

  • add a link to some text
  • try to edit the link using the link editor
  • the link editor's dropdown closes unexpectedly

This issue might be upstream Taiga UI issue. Let me know if I should open a bug report there.
Also, the issue is only reproducible on Chrome, Firefox doesn't seem to have the issue.

Taiga UI version

4.8.1

Browser Used

Chrome

OS Used

Windows

@hakimio hakimio added bug Something isn't working state: need triage state need triage labels Sep 26, 2024
@waterplea
Copy link
Contributor

If you can reproduce it with other Taiga UI dropdowns please file it for Taiga. We do reach out to animation engine inside ActiveZone directive so that might be related.

@hakimio
Copy link
Contributor Author

hakimio commented Sep 26, 2024

The code seems to just use simple [tuiDropdown]="dropdown". By "other dropdowns" do you mean you need even more simplified test case or sth else?

I have already debugged the code there and there is nothing there that explicitly closes the dropdown when you press the edit button.

@waterplea
Copy link
Contributor

Opening/closing is controlled with this directive:
https://github.com/taiga-family/editor/blob/main/projects/editor/components/editor/dropdown/dropdown-toolbar.directive.ts
So that could be editor issue, not Taiga UI issue. But if you face it with other Taiga UI dropdowns, please let us know.

@hakimio
Copy link
Contributor Author

hakimio commented Sep 26, 2024

Ok, I'll try to simplify the test case and see if I can reproduce it without the tuiToolbarDropdown.

@splincode
Copy link
Member

@hakimio thank you very much!

@hakimio
Copy link
Contributor Author

hakimio commented Sep 27, 2024

Tried to reproduce using tuiDropdownSelection directive but that seems to work fine. So, it might be an issue with tuiToolbarDropdown:

Stackblitz demo

@splincode splincode removed the state: need triage state need triage label Oct 2, 2024
@hakimio hakimio changed the title 🐞 - Link editor's issues 🐞 - Link editor closes unexpectedly when provideAnimationsAsync() is used Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants