-
Notifications
You must be signed in to change notification settings - Fork 272
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: make input-based components open dialog on mobile device #1144
Conversation
|
… into responsive_popover
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.
ReadOnly inputs can be edited, but should not. (Open the ComboBox page in mobile simulator and find the readonly combo, open it and edit it)
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.
- The ComboBox lacks autocompletion, that is present in desktop mode
- Active state upon selection is missing in mobile mode
|
fixed |
@@ -311,13 +325,17 @@ class ComboBox extends UI5Element { | |||
|
|||
_afterClosePopover() { | |||
this._iconPressed = false; | |||
|
|||
if (isPhone()) { | |||
this.blur(); |
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.
A little odd, what is the reason for "this.blur()", it is being opening again or?
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.
It is to close the device keyboard and prevent focus to stay in the ui5-combobox, so that the user can't write in it. The user should only be able to write in the dialog's input
packages/main/src/Input.js
Outdated
this.firstRendering = false; | ||
} | ||
|
||
_afterOpenPopover() { |
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.
move next to _afterClosePopover to improve readability.
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.
Done.
|
||
static async define(...params) { | ||
await Promise.all([ | ||
Dialog.define(), |
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.
if it`s one thing to await: "await Dialog.define();" is enough.
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.
Done.
No ResponsivePopover opened after pressing in ui5-input with suggestions. What is a expected behavior ? https://sap.github.io/ui5-webcomponents/playground/components/Input/ |
Hello @MarekLukacAnodius , The expected behavior is that an input with suggestions would automatically open a dialog on mobile device when tapped. I also noticed some issues, would you please open an issue for that? Best regards, |
Created new ResponsivePopover component, which extends Popover. On desktop devices the behavior is the same as before. On phones a dialog is opened instead of popover. Same events and "opened" state apply.
Affected components:
Fixes #1087