FocusTrapZone Scroll Bug
Bug Report
- Package version(s): 5.40.0
- Browser and OS versions: (fill this out if relevant)
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? No
Requested priority: High
Products/sites affected: Planner Web
Describe the issue:
If the contents of a FocusTrapZone are scrollable, any click / mousedown event will cause the content to scroll to the top.
Actual behavior:
When scrolled down in a FocusTrapZone, any click from the user will cause the content to scroll to the top. This means that any clickable links / attachments in the scroll area cannot be clicked on and the user view is scrolled back to the top.
Expected behavior:
No auto scroll to top when a user clicks when inside a scrollable FocusTrapZone.
If applicable, please provide a codepen repro:
https://developer.microsoft.com/en-us/fabric#/components/focustrapzone
In this demo go to the Multiple Nest FocusTrapZones section and zoom in (500% in chrome) until there is a scroll bar in the demo. Turn on "Focus Trap Zone One". Scroll down in the demo window and click anywhere in the page and the view will automatically be scrolled to the top top Focus Trap Zone One.
Looks like this has been fixed in the most recent version.