-
Notifications
You must be signed in to change notification settings - Fork 254
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
feat(ui5-upload-collection-item): implement keyboard handling #1702
Conversation
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.
There are 2 bugs:
- Esc doesn't close the rename input
- When you press Enter after file rename, the focus is lost. The correct behavior is to set the focus on the whole item.
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.
We never check for parentElement, this is an antipattern. Lists have similar interactions and they always use events. This way, even if children are slotted, it still works.
@ilhan007 can maybe point to examples?
In addition, clicking the Rename button with mouse (not enter) loses focus.
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.
Final step :) looks much better, please make this more generic
I've proposed a name that would fit and be universal and usable for others as well
This change improves editing the name of file in
ui5-upload-collection-item
. On enter in the input and pressing the rename button, the name is saved. On pressing cancel in the input or escape the name is not changed.Part of #1534