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

Dropdown options are rendered above the title sticky header when scrolling #6026

Open
LinHuiqing opened this issue Mar 31, 2023 · 15 comments · May be fixed by #6501
Open

Dropdown options are rendered above the title sticky header when scrolling #6026

LinHuiqing opened this issue Mar 31, 2023 · 15 comments · May be fixed by #6501
Labels
bug Something isn't working contribute free for contributors to pick up

Comments

@LinHuiqing
Copy link
Contributor

LinHuiqing commented Mar 31, 2023

Describe the bug
Dropdown options are rendered above the title sticky header when scrolling.

To Reproduce
Steps to reproduce the behavior:

  1. Create a long form with a dropdown field. Or use this form as a sample, then select the "Attending" option for RSVP.
  2. Open the dropdown.
  3. Leaving the dropdown options open, scroll down.
  4. The dropdown options will appear above the title sticky header.

Expected behavior

Dropdown options should go under the title sticky header when they overlap during scrolling.
Close popover when combobox is scrolled out of view

Screenshots

Screen.Recording.2023-03-31.at.1.15.56.PM.mov
@packirisamykaran
Copy link

Hi i would like to work on this issue

@KenLSM KenLSM added the bug Something isn't working label Apr 3, 2023
@timotheeg timotheeg added the contribute free for contributors to pick up label Apr 3, 2023
@LinHuiqing
Copy link
Contributor Author

LinHuiqing commented Apr 3, 2023

Hi @packirisamykaran! Sure, thanks for the initiative! Before you start work, could you sign our Contributor License Agreement? Thank you!

@packirisamykaran
Copy link

packirisamykaran commented Apr 3, 2023

Hi @packirisamykaran! Sure, thanks for the initiative! Before you start work, could you sign our Contributor License Agreement? Thank you!

Alright, I have signed.

@LinHuiqing
Copy link
Contributor Author

Hi @packirisamykaran, sorry, could you fill in the form again here: https://go.gov.sg/ogp-cla-2023? We didn't receive your response the previous time. After which, you can start on your development if you haven't already! 👍

@packirisamykaran
Copy link

Hi @packirisamykaran, sorry, could you fill in the form again here: https://go.gov.sg/ogp-cla-2023? We didn't receive your response the previous time. After which, you can start on your development if you haven't already! 👍

Alright no worries, I have submitted it again. Let me know if you have received it

@LinHuiqing
Copy link
Contributor Author

Hi @packirisamykaran, sorry, could you fill in the form again here: https://go.gov.sg/ogp-cla-2023? We didn't receive your response the previous time. After which, you can start on your development if you haven't already! 👍

Alright no worries, I have submitted it again. Let me know if you have received it

Yup, got it! Thank you!

@packirisamykaran
Copy link

Hi @packirisamykaran, sorry, could you fill in the form again here: https://go.gov.sg/ogp-cla-2023? We didn't receive your response the previous time. After which, you can start on your development if you haven't already! 👍

Alright no worries, I have submitted it again. Let me know if you have received it

Yup, got it! Thank you!

Great thanks

@packirisamykaran
Copy link

packirisamykaran commented Apr 8, 2023

Hello @LinHuiqing, I am new to contributing to open-source projects and I am unable to log in due to not being on the whitelist. can I only locate and resolve the issue by browsing through the repository?

@LinHuiqing
Copy link
Contributor Author

Hello @LinHuiqing, I am new to contributing to open-source projects and I am unable to log in due to not being on the whitelist. can I only locate and resolve the issue by browsing through the repository?

Hey @packirisamykaran! When developing on your local environment, you can login with any hypothetical email ending with "gov.sg". The OTP will printed through to terminal on the backend, or you can use the MailDev server to receive incoming mails at https://localhost:1080.

@packirisamykaran
Copy link

Hello @LinHuiqing, I am new to contributing to open-source projects and I am unable to log in due to not being on the whitelist. can I only locate and resolve the issue by browsing through the repository?

Hey @packirisamykaran! When developing on your local environment, you can login with any hypothetical email ending with "gov.sg". The OTP will printed through to terminal on the backend, or you can use the MailDev server to receive incoming mails at https://localhost:1080.

Ok it works. thank you

@LeonardYam
Copy link
Contributor

Hi @LinHuiqing, I would like to work on this issue! I have already signed the CLA.

@LinHuiqing
Copy link
Contributor Author

Hi @LinHuiqing, I would like to work on this issue! I have already signed the CLA.

Hey @LeonardYam, sorry for the late reply. Sure, go ahead, thanks!

@LeonardYam
Copy link
Contributor

Hi @LinHuiqing, I've discovered the issue - <FloatingPortal> portals the dropdown options into the document body which renders above everything in the app. We can fix this by removing the portal from SelectMenu.tsx and adding an appropriate z-index as shown below.

Recording.mov

An alternative would be to keep the portal but pass a suitable DOM node to append the dropdown options. Let me know which approach is preferred here :)

@LinHuiqing
Copy link
Contributor Author

Hi @LinHuiqing, I've discovered the issue - <FloatingPortal> portals the dropdown options into the document body which renders above everything in the app. We can fix this by removing the portal from SelectMenu.tsx and adding an appropriate z-index as shown below.

Recording.mov

An alternative would be to keep the portal but pass a suitable DOM node to append the dropdown options. Let me know which approach is preferred here :)

Hi @LeonardYam, sorry for the delayed replies as I'm travelling 😅 I think the former approach will work, thanks! Do open a PR with the fix and we'll review accordingly. Thank you!

@LeonardYam LeonardYam linked a pull request Jul 2, 2023 that will close this issue
2 tasks
@foochifa
Copy link
Contributor

Updating this issue.

From UX point of view, the intended interaction should be to close the popover when scrolled out of view (including under the header). This is to ensure that users are not interacting with elements that are outside of their viewport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contribute free for contributors to pick up
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants