Skip to content
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-popover): prevent closing when no opener #1911

Merged
merged 2 commits into from
Jul 7, 2020

Conversation

ilhan007
Copy link
Member

@ilhan007 ilhan007 commented Jul 6, 2020

The change is related to the Quick View topic and affects the Input, InputSuggestions and Popover, and enables the following behaviour: (1) open an additional Popover from a suggestion on mouseover and suggestion-item-preview events, (2) to move the focus in that Popover, (3) to keep it open without a visible opener, and (4) the ability to get back via ESC.

  • Add parameter to the openBy method to prevent the popover from closing when its opener is not visible anymore
    and use the old placement when the opener is gone (by default the popover would go to the top-left most corner).

  • Add public method Popup.prototype.applyFocus (the logic has been extracted from applyInitialFocus) that focuses the first focusable element inside the Popup

  • Change the focus retaining logic in Input/InputSuggestions as follows: returns the focus to the input field only when a suggestion is selected by the user, in other cases - does not, because otherwise focusing another popover would not be possible as the Input keeps getting focus again and again.

  • Previously it was not possible to use the "close" params with the ResponsivePopover, now it forwards them to the Popover.

  • Create a test page to show the entire flow

Related to: #1768

@ilhan007 ilhan007 merged commit e7c2518 into master Jul 7, 2020
@ilhan007 ilhan007 deleted the ref-popover-closing branch July 7, 2020 11:27
ilhan007 added a commit that referenced this pull request Jul 7, 2020
The change is related to the Quick View topic and affects the Input, InputSuggestions and Popover, and enables the following behaviour: (1) open an additional Popover from a suggestion on mouseover and suggestion-item-preview events, (2) to move the focus in that Popover, (3) to keep it open without a visible opener, and (4) the ability to get back via ESC.
Add parameter to the openBy method to prevent the popover from closing when its opener is not visible anymore
and use the old placement when the opener is gone (by default the popover would go to the top-left most corner).
Add public method Popup.prototype.applyFocus (the logic has been extracted from applyInitialFocus) that focuses the first focusable element inside the Popup
Change the focus retaining logic in Input/InputSuggestions as follows: returns the focus to the input field only when a suggestion is selected by the user, in other cases - does not, because otherwise focusing another popover would not be possible as the Input keeps getting focus again and again.
Previously it was not possible to use the "close" params with the ResponsivePopover, now it forwards them to the Popover.
Create a test page to show the entire flow

Related to: #1768
@ilhan007 ilhan007 added this to 1.0.0-rc.8 (released) in UI5 Web Components - Roadmap Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants