taiga-family / editor

Text editor
https://taiga-family.github.io/editor/
Apache License 2.0
27 stars 7 forks source link

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

Open hakimio opened 1 month ago

hakimio commented 1 month ago

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.

To reproduce the second issue I have provided stackblitz demo:

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

waterplea commented 1 month ago

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 commented 1 month ago

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? https://github.com/taiga-family/editor/blob/dbb5c51907edabbb66724781d82a97b6ef7b4167/projects/editor/components/editor/editor.component.html#L52

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

waterplea commented 1 month ago

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 commented 1 month ago

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

splincode commented 1 month ago

@hakimio thank you very much!

hakimio commented 1 month ago

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

Stackblitz demo