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

ROU-4664: Prevent dom move when inside popup #870

Merged
merged 5 commits into from
Dec 7, 2023
Merged

ROU-4664: Prevent dom move when inside popup #870

merged 5 commits into from
Dec 7, 2023

Conversation

BenOsodrac
Copy link
Contributor

@BenOsodrac BenOsodrac commented Dec 6, 2023

This issue happens only in ODC, as the new version of react-dom adds all events on the ReactContainer, instead of adding it on every widget. This causes an issue with widgets inside the DropdownServerSide, when placed inside the Popup. As the Popup is placed outside the reactContainer, together with the MoveElement we are doing on the Dropdown, it causes all widgets inside to loose the attached listeners.

  • Added method to check if an element is inside the Popup widget.
  • Added exception to only use MoveElement on DropdownServerSide if its not inside Popup, otherwise add custom class
  • Added different CSS with that class, to adjust behaviour for dropdown inside the Popup

This approach was followed, as no other tested solved the issue. Removing the MoveElement and changing the overall position to fixed, would cause issues inside other patterns, like the Sidebar This was the most safe and reliable solution found.

Checklist

  • tested locally
  • documented the code
  • clean all warnings and errors of eslint
  • requires changes in OutSystems (if so, provide a module with changes)
  • requires new sample page in OutSystems (if so, provide a module with changes)

@BenOsodrac BenOsodrac closed this Dec 6, 2023
@BenOsodrac BenOsodrac deleted the ROU-4664 branch December 6, 2023 13:51
@BenOsodrac BenOsodrac restored the ROU-4664 branch December 6, 2023 13:52
@BenOsodrac BenOsodrac reopened this Dec 6, 2023
@BenOsodrac BenOsodrac marked this pull request as ready for review December 6, 2023 14:52
Copy link

sonarqubecloud bot commented Dec 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@BenOsodrac BenOsodrac merged commit cc7eb40 into dev Dec 7, 2023
12 checks passed
@BenOsodrac BenOsodrac deleted the ROU-4664 branch December 7, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants