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

[menu]: when using Menu in Table on mobile devices app crashes #7767

Closed
1 task done
rvsia opened this issue Oct 30, 2023 · 5 comments · Fixed by #8367
Closed
1 task done

[menu]: when using Menu in Table on mobile devices app crashes #7767

rvsia opened this issue Oct 30, 2023 · 5 comments · Fixed by #8367
Assignees
Labels
bug This issue is a bug in the code High Prio SAP SF SAP Signavio SAP Signavio TOPIC B

Comments

@rvsia
Copy link

rvsia commented Oct 30, 2023

Describe the bug

When using a Menu component in Table on mobile devices, the app is crashing:

Error
Web component processed too many times this task, max allowed is: 10
 2 stack frames were expanded.
    at RenderQueue.process (https://prk2z7.codesandbox.io/node_modules/
ui5/webcomponents-base/dist/RenderQueue.js:45:15
    at eval (https://prk2z7.codesandbox.io/node_modules/
ui5/webcomponents-base/dist/Render.js:84:34

Isolated Example

https://codesandbox.io/s/smoosh-tdd-cywz6k

Reproduction steps

  1. Open the example
  2. Open the preview in a new window
  3. Set the window to responsive mode (simulate mobile devices)
  4. Click on menu

Expected Behaviour

Menu should be open

Screenshots or Videos

Kapture 2023-10-30 at 12 24 17
`
image

UI5 Web Components for React Version

latest

UI5 Web Components Version

latest

Browser

Chrome, Edge

Operating System

MacOS

Additional Context

  • This will be probably a webcomponents issue but I do not know how to reproduce the issue there

Relevant log output

No response

Declaration

  • I’m not disclosing any internal or sensitive information.
@rvsia rvsia added the bug This issue is a bug in the code label Oct 30, 2023
@rvsia rvsia changed the title [menu]: when using Menu in Table on mobile devices it failse [menu]: when using Menu in Table on mobile devices app crashes Oct 30, 2023
@Lukas742
Copy link
Collaborator

Hi @rvsia

Thanks for reporting! I'll forward this issue to our UI5 Web Components Colleagues as the affected components are developed in their repository.

Also, it's not recommended rendering modals or popups inside other components. You can find out more about this here. In this case the issue is also occurring when the Menu is rendered outside, but keeping this in mind will help avoid future problems.


Hi colleagues,
the issue is reproducible using ui5-webcomponents without our wrapper: https://codesandbox.io/s/ui5-webcomponents-forked-3zzmdn?file=/index.html

You can follow the steps provided by @rvsia with this codeSandbox as well.

@Lukas742 Lukas742 transferred this issue from SAP/ui5-webcomponents-react Oct 30, 2023
@rvsia
Copy link
Author

rvsia commented Oct 30, 2023

@Lukas742

Also, it's not recommended rendering modals or popups inside other components.

Thank you for pointing this up, we forget to use the portal here as it is working well for us on normal screens. In other places where we encounter issues, we use Portal. 👍

@nnaydenow
Copy link
Contributor

Hi @SAP/ui5-webcomponents-topic-b,

Could you please check this issue? It's reproducible with native ui5-webcomponets as well.
https://codesandbox.io/s/ui5-webcomponents-forked-k8fklj?file=/index.html

@Lukas742
Copy link
Collaborator

Hi colleagues,
as the linked issue above shows, the error is also thrown when a menu is used outside of a Table. I've edited my codeSandbox from above to include this as well: https://codesandbox.io/s/ui5-webcomponents-forked-3zzmdn?file=/index.html

@TobiasKoehler01
Copy link

Hi colleagues,
we have unfortunately the same problem and using the menu in a live project and now need to hold back a new feature that uses the menu component. Any news on this?

unazko added a commit to unazko/ui5-webcomponents that referenced this issue Feb 28, 2024
- The ui5-menu elements used for sub-menus are created only once
and are being reused afterwards. They are no longer destroyed on close.
This contributes to lowering the count of the slow DOM manipulation operations.

- There is now no differentiation between mobile and desktop
device in regards to the display mechanism. In both cases
we rely on the template to do the job as the components used
for composition like ui5-list and ui5-responsive-popover do
comply with the device.

Fixes: SAP#7767
Fixes: SAP#7423
Fixes: SAP#6761
Related to: SAP#7391
unazko added a commit that referenced this issue Mar 25, 2024
- The ui5-menu elements used for sub-menus are created only once
and are being reused afterwards. They are no longer destroyed on close.
This contributes to lowering the count of the slow DOM manipulation operations.

- There is now no differentiation between mobile and desktop
device in regards to the display mechanism. In both cases
we rely on the template to do the job as the components used
for composition like ui5-list and ui5-responsive-popover do
comply with the device.

Fixes: #7767
Fixes: #7423
Fixes: #6761
ilhan007 pushed a commit that referenced this issue Mar 29, 2024
- The ui5-menu elements used for sub-menus are created only once
and are being reused afterwards. They are no longer destroyed on close.
This contributes to lowering the count of the slow DOM manipulation operations.

- There is now no differentiation between mobile and desktop
device in regards to the display mechanism. In both cases
we rely on the template to do the job as the components used
for composition like ui5-list and ui5-responsive-popover do
comply with the device.

Fixes: #7767
Fixes: #7423
Fixes: #6761
@petyabegovska petyabegovska moved this to Completed in Maintenance - Topic B Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug in the code High Prio SAP SF SAP Signavio SAP Signavio TOPIC B
Projects
Status: Completed
6 participants