-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix(tooltip): clean up focus handling #273
Conversation
Do you plan to have this fix in the current release already? I'm asking because I already released the popup editor via a minor version, so bumping the properties panel would mean we introduce this everywhere. Not a problem, just wanted to make sure we are aware of this 👍 |
Would this change anything, since it hans't been released with form-js? I don't think this is blocking, so we can postpone releasing |
Thanks for a quick fix. How would I test this? Could you share what the root cause of the problem is? |
You can test it by liking this branch in
Like I mentioned above, we added a |
So if I get it correctly, we want to keep the interaction within tooltip. Is there any need for prevent default in that case? |
Also, it would be cool to have automatic tests for both |
The prevent default prevents the trigger element (group header) to become focused via mouse, thus keeping the tooltip open. We only want that to happen via keyboard navigation.
I can work on adding test cases for |
There is actually a test for rendering via portal I haven't been able to add a test case that reproduces the content selectable or the focus issue I mentioned was fixed with prevent default. |
Closes #272 Related to camunda/camunda-modeler#3756
When trying to fix #272 and camunda/camunda-modeler#3756, I ended up breaking one while fixing the other. This is because preventing default actions in some places (like focus on In order to not end up with super confusing code trying to gracefully handle these events, I decided to clean up how we open/persist tooltips based on focus - which is what causes all the issues. I also added some test cases which should help enforce this, but it's hard to test these things for every case so feel free to give it a good user test. |
bbcae61
to
eae9473
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closes #272
Related to camunda/camunda-modeler#3756