-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Addressed issues related to closing dropdowns and "Show more items" menu in the toolbar #12319
Conversation
…ildren loses focus.
If I understand correctly: if the While cleaning up the "where to put code that overrides the default behavior" problem in the previous iteration I thought that perhaps this could be approached differently (although, that would be a precedent) – e.g. via some |
Let's have a meeting about this maybe? |
Besides, I just noticed (CI) that there are some adjustments necessary in other packages. |
I checked the PR functionally and everything works fine in all editor types. I confirm it also fixes #12005 as mentioned in the PR comment. As we discussed, I'm not diving into the code review until the QA team approves it too. |
Can we have some feedback on this PR please @ckeditor/qa-team? Scope:
There's also #12005 on top of that. Thanks 🙏 |
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.
LGTM, I left some discussion comments but they are not mandatory from my perspective. Still we're waiting for the QA check before merging the PR.
@oleq, both using the feature and clicking somewhere else close both the feature (media, table, etc.) dropdown and the "Show more items" dropdown/toolbar. However, the |
Special characters dropdown closes when clicked between the character buttons. In case of balloon/inline editor, the toolbar closes as well. Steps to make reproducing easier:
Screen.Recording.2022-08-30.at.16.31.07.movOn |
With @Acrophost we have finished testing and we've not found any more issues with this PR beyond the ones above. |
This is correct, sorry for not being specific. Esc should close UI elements "one by one" until you reach the editing root. Clicking the editing root should close everything at once. |
… focus loss in the editor.
Addressed in d3a4bb7. |
Let's have another look at this PR @Dumluregn 🙂 |
…y run the same in the windowed and window-less env.
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.
LGTM, I think the code of DropdownView
class looks much cleaner now with all the logic moved to the utils.
Suggested merge commit message (convention)
Fix (ui):
DropdownView
should close when it gets blurred. Also,DropdownView
should focus its#buttonView
when it gets closed and the focus was inside itspanelView
. Closes #12178. Closes #12186. Closes #12005.❓ To be verified: Does it resolve #12005?Additional information
This is a successor to #12239. It fixes both #12178 and #12186.
In this PR I did some considerable refactoring. I moved some logic from
DropdownView
to individual behaviors in dropdown utils. The assumption is that the bareDropdownView
should be just a dumb button+panel that offers a lot of flexibility for developers who use it in different ways (e.g. see the formatting dropdown example in docs).