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 inside Dialog unable to scroll on touch screen #15750

Closed
FosterSamuel opened this issue Oct 28, 2020 · 5 comments
Closed

Dropdown inside Dialog unable to scroll on touch screen #15750

FosterSamuel opened this issue Oct 28, 2020 · 5 comments
Assignees
Labels
Component: Dialog Component: Dropdown Fluent UI react (v8) Issues about @fluentui/react (v8) Needs: Investigation The Shield Dev should investigate this issue and propose a fix Resolution: Soft Close Soft closing inactive issues over a certain period

Comments

@FosterSamuel
Copy link

Environment Information

  • Package version(s): 7.
  • Browser and OS versions: Edge, Windows 10

Please provide a reproduction of the bug in a codepen:

https://codepen.io/powerchelle/pen/ExyXYzM

Actual behavior:

The dropdown is scrollable with a touch screen. However, when the dropdown is inside a Dialog, it is no longer scrollable using a touch screen.

Interestingly, a simulated touch screen via Device Emulation does not cause this problem. I am only able to reproduce it by physically touching the screen of my laptop.

Expected behavior:

To be able to scroll this dropdown inside the Dialog while using a touch screen.

Priorities and help requested:

Requested priority: Normal

@paulgildea
Copy link
Member

@FosterSamuel Thanks for filing this issue! Also is this just specific to Windows machines or have you seen similar behavior on other touch devices?

@paulgildea paulgildea added Component: Dialog Component: Dropdown Fluent UI react (v8) Issues about @fluentui/react (v8) Needs: Investigation The Shield Dev should investigate this issue and propose a fix and removed Needs: Triage 🔍 labels Oct 30, 2020
@FosterSamuel
Copy link
Author

Hi @paulgildea, thanks for looking into this. I've only seen this on my Windows touchscreen laptop and don't have other devices to test. I also cannot repro it from Device Emulation, which boggles me.

@joschect
Copy link
Contributor

joschect commented Jan 4, 2021

Hi @FosterSamuel This is caused by the way that we prevent IOS overscroll. You can override the behavior by adding allowTouchBodyScroll to the underlying modal. You can see it working in this codepen

@alonsh4
Copy link

alonsh4 commented Feb 8, 2021

I got a solution from @joschect (thanks).
Adding 'allowTouchBodyScroll: true' to the Dialog solved the problem. See example below:

  <Dialog
    hidden={hideDialog}
    onDismiss={toggleHideDialog}
    dialogContentProps={dialogContentProps}
    modalProps={{ allowTouchBodyScroll: true }}
  >
    <Dropdown
      options={options}
      styles={{ dropdownItems: { height: 200 } }}
    />
  </Dialog>

@msft-fluent-ui-bot
Copy link
Collaborator

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

@msft-fluent-ui-bot msft-fluent-ui-bot added the Resolution: Soft Close Soft closing inactive issues over a certain period label Jul 8, 2021
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: Dialog Component: Dropdown Fluent UI react (v8) Issues about @fluentui/react (v8) Needs: Investigation The Shield Dev should investigate this issue and propose a fix Resolution: Soft Close Soft closing inactive issues over a certain period
Projects
None yet
Development

No branches or pull requests

7 participants